• Resolved chumidor

    (@chumidor)


    I am getting a critical error on my website and when I look at the error log it says it is on line 1732. That line says

    foreach ( $menu as $i => $item ) {

    I’m not sure why it’s giving an error. The info above and below reads:

    
    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;
    }
    

    Anyone know what is wrong with this?

    • This topic was modified 4 months, 2 weeks ago by Jose Castaneda. Reason: added backticks for code
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Howdy!

    What does the error message say? Have you tried deactivating all plugins to see if that resolves the issue?

    I can’t get into the dashboard to deactivate anything because of the Critical Site error. The error message from the log says

    [01-Sep-2020 15:53:55 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/humidor/public_html/wp-admin/includes/plugin.php on line 1732

    Line 1732 is the line I posted in my original message

    Well whatever the issue was, seemed to get resolved by my web developer.

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    One way to disable them would be using an SFTP program to rename the plugins folder.

    That will allow you to re-gain access to the admin.

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Interesting but glad it’s resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.