Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1038731

    Hi guys,

    I see this showing up in the backend in the Enfold left menu:

    Warning: array_flip(): Can only flip STRING and INTEGER values! in /home/barcelq8/public_html/villaitaly.it/wp-content/themes/enfold/framework/php/class-htmlhelper.php on line 1571

    I have no idea what it means and whether it can give an issue/how to fix it.

    Can you help, please?

    Thank you so much

    Antonio

    Error message

    #1039559

    Hey Antonio,

    Thanks for the screenshot and login details, though the login details don’t seem to work. Could you check and verify please?

    Best regards,
    Rikard

    #1040657
    This reply has been marked as private.
    #1041235

    Hi,

    Thanks for the info.

    This should help: https://kriesi.at/support/topic/fehler-beim-update/#post-1024333

    Best regards,
    Ismael

    #1043605

    Thanks Ismael,

    the thread you posted is in German…while I understand German I’m not sure I found the solution, can you help?

    Thanks

    #1044712

    Hi,

    Sorry about that. You need edit the enfold/framework/php/class-htmlhelper.php on line 1571

    $menu_locations = array_flip( get_nav_menu_locations() );
    

    Replace it with:

           /**
    			 * array_flip does not work because plugins like WPML might return '' or null for value which throws a warning
    			 * 
    			 * $menu_locations = array_flip( get_nav_menu_locations() );
    			 */
    			$menu_locations = array();
    			$temp = get_nav_menu_locations();
    			foreach ( $temp as $loc => $term_id ) 
    			{
    				if( is_numeric( $term_id ) && ( $term_id > 0 ) )
    				{
    					$menu_locations[ $term_id ] = $loc;
    				}
    			}
    

    Best regards,
    Ismael

    #1044764

    Thank you @Ismael,

    I tried your solution but there seem to be an error at line 1578:

    foreach ( $temp as $loc => $term_id )

    Error notice

    Do you know what the correct line should be?

    Thank you

    Antonio

    #1045193

    Hi,

    Did you copy the code from your email? Try to copy it directly from the forum. Make sure that the site is running on version 4.5.1.

    Best regards,
    Ismael

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