I have the same issue on update to Version 3.77.
It errors when foreach is trying to access empty array on line 157.
Please add the check and update the code soon:
if(!empty($menuItems)){
public function getNavMenuItemsWithPopup($navMenuLocations = array(), $forceUpdate = false)
{
if (!isset(self::$navMenuItems) && !$forceUpdate) {
foreach ($navMenuLocations as $menuName => $menuId) {
$menuItems = wp_get_nav_menu_items($menuId);
if(!empty($menuItems)){
foreach ($menuItems as $menuItem) {
$popupId = $menuItem->sgpbPopupId;
if ($popupId > 0) {
self::$navMenuItems[] = $menuItem;
}
}
}
}
}
return isset(self::$navMenuItems) ? self::$navMenuItems : array();
}
I’m getting the following PHP error as well.
Warning: Invalid argument supplied for foreach() in /home/ccchso5/public_html/wp-content/plugins/popup-builder/com/classes/components/Menu.php on line 157
Popup Builder v 3.77
Same issue, please fix this ASAP.
I have the same error:
Warning: Invalid argument supplied for foreach() in /home/customer/www/stoodleighcourtcoachhouse.co.uk/public_html/wp-content/plugins/popup-builder/com/classes/components/Menu.php on line 157
Please fix ASAP
-
This reply was modified 5 years, 2 months ago by
birdsflyfree.
Dear @birdsflyfree , @twistedfngrs, @andy-galaxy, @clickingclients and @paolo1992
Thanks for reporting.
This is to inform you, that the issue is solved with the latest 3.78 version of the plugin.
Please, update it and let us know if that helped.
Well done! No error now. Thanks for prompt fix. Chers, Andy
Thanks for getting this done. Glad my code helped.
Fab! No error now! Thanks for your speedy response! 🙂
Awesome plugin by the way. Keep up the good work.
-
This reply was modified 5 years, 2 months ago by
Andy Galaxy.
Thanks for the update 🙂
We are happy the issue is gone now.
Thanks for the nice words as well.
We will keep improving the plugin.