• 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 ) {

  • The topic ‘Invalid argument in plugin.php’ is closed to new replies.