WordPress.org

Ready to get started?Download WordPress

Forums

Invalid argument in plugin.php (1 post)

  1. saturnus
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic