Undefined Offset
-
Hi Rahul!
I just wanted to report an issue with the Editor role (I haven’t tested lower) and AnsPress.
On every admin menu item it states:
Notice: Undefined offset: 2 in /..../wp-admin/includes/plugin.php on line 1573Regarding function
get_admin_page_parent()Since I’m using WordPress 4.4 beta, this is the code which is interacting:
foreach (array_keys( (array)$submenu ) as $parent) { foreach ( $submenu[$parent] as $submenu_array ) { if ( isset( $_wp_real_parent_file[$parent] ) ) $parent = $_wp_real_parent_file[$parent]; if ( !empty($typenow) && ($submenu_array[2] == "$pagenow?post_type=$typenow") ) { $parent_file = $parent; return $parent; // == Next line: Line 1573 == } elseif ( $submenu_array[2] == $pagenow && empty($typenow) && ( empty($parent_file) || false === strpos($parent_file, '?') ) ) { $parent_file = $parent; return $parent; } elseif ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) ) { $parent_file = $parent; return $parent; } } }This means that
$submenu_array[2]is undefined and$typenowis empty.I’m unsure where to look, but it’s probably backtrace-able (http://php.net/manual/en/function.debug-backtrace.php) and I just wanted to notify this as I’m running WP_DEBUG.
I think it has something to do with that the menu’s are loaded, but not shown. A capability error as I might say.
Thanks for all your effort, keep up the good work!
Marking this topic as not a support question 🙂
The topic ‘Undefined Offset’ is closed to new replies.