You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this plugin requires at least PHP 5.3 due to its use of closures and namespaces, but are there any known compatibility issues beyond that?
I was able to use it fine on a server running PHP 5.5.15, but on another server with PHP 5.4.43 I get the following errors when WP_DEBUG is on (the errors only come up once this plugin is activated and disappear again when it is deactivated):
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 925
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 943
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 925
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 943
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 925
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 943
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 925
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 943
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 925
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 943
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 925
Notice: Undefined offset: 0 in ..../wp-includes/plugin.php on line 943
Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in ..../wp-includes/plugin.php on line 525
In addition, on this server, the widget is not available, and I also noticed the admin menu item appears up amongst the posts (below Pages) whereas it is between Tools and Settings on the PHP 5.5.15 server, where it functions correctly.
The text was updated successfully, but these errors were encountered:
I was able to solve this for now by changing a bunch of filters and one action to call defined functions rather than anonymous functions.
Following are all the filter/action calls I found I needed to change. They're all called in plugin.php:
dfp_ads_menu_position
dfp_ads_metabox_fields
dfp_ads_settings_sections
dfp_ads_settings_fields
dfp_ads_import_sections
dfp_ads_import_fields
widgets_init
I'm still not sure exactly what is causing this problem as I can't see any reason why PHP 5.4.43 shouldn't fully support anonymous functions, and I'm not sure that I've caught all the ones which were having issues either.
I know this plugin requires at least PHP 5.3 due to its use of closures and namespaces, but are there any known compatibility issues beyond that?
I was able to use it fine on a server running PHP 5.5.15, but on another server with PHP 5.4.43 I get the following errors when WP_DEBUG is on (the errors only come up once this plugin is activated and disappear again when it is deactivated):
In addition, on this server, the widget is not available, and I also noticed the admin menu item appears up amongst the posts (below Pages) whereas it is between Tools and Settings on the PHP 5.5.15 server, where it functions correctly.
The text was updated successfully, but these errors were encountered: