gravity-forms-custom-post-types icon indicating copy to clipboard operation
gravity-forms-custom-post-types copied to clipboard

PHP 5.4 Strict Standards Error: Non-Static Method

Open ryanjbonnell opened this issue 11 years ago • 2 comments

Using PHP 5.4 with WP_DEBUG enabled, I get the following error(s):

Strict Standards: Non-static method GFCPTAddon::get_base_path() should not be called statically in /wp-content/plugins/gravityforms-custom-post-types/gfcptaddon.php on line 55

Strict Standards: Non-static method GFCPTAddon::get_base_path() should not be called statically in /wp-content/plugins/gravityforms-custom-post-types/gfcptaddon.php on line 58

This error did not appear when I was running PHP 5.3, but with PHP 5.4+ changing E_ALL to include E_STRICT2, I get this error in both the WordPress admin and the theme front-end.

I'm using Gravity Forms + Custom Post Types v3.0.1 with WordPress 3.8.1 on PHP v5.4.17.

ryanjbonnell avatar Feb 18 '14 23:02 ryanjbonnell

Just replace #121

protected function get_base_path(){

with

protected static function get_base_path(){

wtaeke avatar Jun 12 '14 12:06 wtaeke

Issue also mentioned here: https://wordpress.org/support/topic/static-call-notices#post-6996775

cliffordp avatar May 26 '15 22:05 cliffordp