[wp-trac] [WordPress Trac] #43714: remove_menu_page(): E_WARNING: Invalid argument supplied for foreach()
WordPress Trac
noreply at wordpress.org
Sun Aug 19 12:42:47 UTC 2018
#43714: remove_menu_page(): E_WARNING: Invalid argument supplied for foreach()
-------------------------------+------------------------------
Reporter: conner_bw | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 4.9.5
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by conner_bw):
I could not reproduce without third-party code.
I fixed it by changing:
{{{
require get_template_directory() . '/inc/intervention.php';
}}}
To:
{{{
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
require get_template_directory() . '/inc/intervention.php';
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43714#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list