Support » Fixing WordPress » Invalid argument in plugin.php

  • Invalid argument supplied for foreach() in wp-admin/includes/plugin.php on line 1290

    function remove_menu_page( $menu_slug ) {
    	global $menu;
    
    	foreach ( $menu as $i => $item ) {
    		if ( $menu_slug == $item[2] ) {
    			unset( $menu[$i] );
    			return $item;
    		}
    	}
    
    	return false;
    }

    line 1290 is foreach ( $menu as $i => $item ) {

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Invalid argument in plugin.php’ is closed to new replies.