Notice: Undefined variable: enabledMobilePlugins and disabledMobilePlugins
-
Hi,
I’m working in Debug mode and in the admin area I’m seeing an undefined variable notice when I publish or update a post or page (It’s not happening on all the admin pages).
Because the headers are being sent to display the warning, WordPress can’t finish loading the page.
I’m including the error output at the end. I tried moving the variable assignment outside an if statement and the problem went away.
wordpress\wp-content\plugins\plugin-organizer\lib\PluginOrganizer.class.php (987)
if (get_option('PO_disable_mobile_plugins') == 1) { $globalMobilePlugins = get_option('PO_disabled_mobile_plugins'); if (!is_array($globalMobilePlugins)) { $globalMobilePlugins = array(); } $disabledMobilePlugins = array(); $enabledMobilePlugins = array();
When I moved the assignments to line 986 (before the if statement), the pages were processed normally:
(986) $disabledMobilePlugins = array(); $enabledMobilePlugins = array(); if (get_option('PO_disable_mobile_plugins') == 1) { $globalMobilePlugins = get_option('PO_disabled_mobile_plugins'); if (!is_array($globalMobilePlugins)) { $globalMobilePlugins = array(); }
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Here’s the output when the page stops loading:
Notice: Undefined variable: enabledMobilePlugins in wordpress/wp-content/plugins/plugin-organizer/lib/PluginOrganizer.class.php on line 1043 Call Stack: 0.0006 871920 1. {wp-content}() wordpress/wp-admin/post.php:0 0.3478 64600928 2. edit_post() wordpress/wp-admin/post.php:218 0.3588 64638184 3. wp_update_post() wordpress/wp-admin/includes/post.php:281 0.3591 64655976 4. wp_insert_post() wordpress/wp-includes/post.php:3016 0.3716 64753424 5. do_action() wordpress/wp-includes/post.php:2954 0.3734 64741248 6. call_user_func_array() wordpress/wp-includes/plugin.php:429 0.3734 64741280 7. PluginOrganizer->save_post_meta_box() wordpress/wp-includes/plugin.php:429 Notice: Undefined variable: disabledMobilePlugins in wordpress/wp-content/plugins/plugin-organizer/lib/PluginOrganizer.class.php on line 1043 Call Stack: 0.0006 871920 1. {wp-content}() wordpress/wp-admin/post.php:0 0.3478 64600928 2. edit_post() wordpress/wp-admin/post.php:218 0.3588 64638184 3. wp_update_post() wordpress/wp-admin/includes/post.php:281 0.3591 64655976 4. wp_insert_post() wordpress/wp-includes/post.php:3016 0.3716 64753424 5. do_action() wordpress/wp-includes/post.php:2954 0.3734 64741248 6. call_user_func_array() wordpress/wp-includes/plugin.php:429 0.3734 64741280 7. PluginOrganizer->save_post_meta_box() wordpress/wp-includes/plugin.php:429 Warning: Cannot modify header information - headers already sent by (output started at wordpress/wp-content/plugins/plugin-organizer/lib/PluginOrganizer.class.php:1043) in wordpress/wp-admin/post.php on line 222 Call Stack: 0.0006 871920 1. {wp-content}() wordpress/wp-admin/post.php:0 0.3763 64640328 2. setcookie() wordpress/wp-admin/post.php:222 Warning: Cannot modify header information - headers already sent by (output started at wordpress/wp-content/plugins/plugin-organizer/lib/PluginOrganizer.class.php:1043) in wordpress/wp-includes/pluggable.php on line 899 Call Stack: 0.0006 871920 1. {wp-content}() wordpress/wp-admin/post.php:0 0.3763 64640112 2. redirect_post() wordpress/wp-admin/post.php:224 0.3767 64640312 3. wp_redirect() wordpress/wp-admin/post.php:75 0.3768 64650624 4. header() wordpress/wp-includes/pluggable.php:899
- The topic ‘Notice: Undefined variable: enabledMobilePlugins and disabledMobilePlugins’ is closed to new replies.