Tagged: error
-
AuthorPosts
-
November 28, 2018 at 9:10 pm #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
December 1, 2018 at 9:32 am #1039559Hey 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,
RikardDecember 4, 2018 at 10:31 am #1040657This reply has been marked as private.December 5, 2018 at 3:03 pm #1041235Hi,
Thanks for the info.
This should help: https://kriesi.at/support/topic/fehler-beim-update/#post-1024333
Best regards,
IsmaelDecember 11, 2018 at 8:27 am #1043605Thanks Ismael,
the thread you posted is in German…while I understand German I’m not sure I found the solution, can you help?
Thanks
December 13, 2018 at 6:21 am #1044712Hi,
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,
IsmaelDecember 13, 2018 at 9:54 am #1044764Thank you @Ismael,
I tried your solution but there seem to be an error at line 1578:
foreach ( $temp as $loc => $term_id )

Do you know what the correct line should be?
Thank you
Antonio
December 14, 2018 at 10:51 am #1045193 -
AuthorPosts
- You must be logged in to reply to this topic.
