PHP Errors in Ajax Response warning when removing comments menu item
grahammtbr opened this issue · comments
grahammtbr commented
Query Monitor yelled at me after adding remove comments menu item to my array,
'wp-admin.{all}' => [
...
'comments',
],
Here's what my console had to say,
component: "Core"
file: "wp-admin/includes/plugin.php"
key: "354ba22554f7809793fd8fbf0d259701"
line: 1769
message: "Invalid argument supplied for foreach()"
stack: (3) […]
0: "remove_menu_page()"
1: "Sober\\I\\A\\S\\Menu->Sober\\I\\A\\S\\{closure}()"
2: "do_action('admin_init')"
length: 3
<prototype>: Array []
type: "warning"
Darren Jacoby commented
Thanks @grahammtbr , added https://github.com/soberwp/intervention/blob/master/src/Admin/Support/Router.php#L60-L62, could you re-test from master? Should solve WP/AJAX related issues.
grahammtbr commented
This fixed the warning, closing.