Opened 16 years ago
Closed 16 years ago
#8782 closed defect (bug) (fixed)
PHP warnings on admin-post/admin-ajax requests if plugins add menu's on the admin_init hook
Reported by: | DD32 | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
WordPress emits PHP Warnings on admin-post/admin-ajax requests if plugins add menu pages on the same request.
It appears that menu.php is never included, and as such, foreach( $menu ...
raises a warning, Casting these to an array beforehand fixes the warnings..
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Ah.. The plugin in question appears to be using the admin_init hook, Not admin_menu, which explains the warnings (as admin_menu would only be called if there are menu's).
Still, Seems like its a good idea to 'support' it.