Warning: Invalid argument supplied for foreach() in /home/golenataylor/public_html/wp-content/plugin

Getting this error message after installing the pop up pro plug in

Warning: Invalid argument supplied for foreach() in /home/golenataylor/public_html/wp-content/plugins/popover/inc/class-popup-public.php on line 190

  • Vinod Dalvi
    • WP Unicorn

    Hi James,

    Sorry to hear of the problem you are having.

    I could confirm the issue on my test site using latest version of PopUp Pro plugin therefore i have notified the plugin developer about this so that it can be fixed.

    In the meanwhile to fix this issue you can try editing the following PopUp Pro plugin file on line number 190 as displayed below.

    PopUp Pro plugin file :
    /popover/inc/class-popup-public.php

    Before Editing :

    foreach ( $popup_data['popup'] as $item ) {
    	$this->enqueued[] = $item['html_id'];
    }

    After Editing :

    if( isset($popup_data['popup']) ){
    	foreach ( $popup_data['popup'] as $item ) {
    		$this->enqueued[] = $item['html_id'];
    	}
    }

    Alternatively you can try using the attached modified plugin file class-popup-public.php that contains the above change so just try using it replacing the above file in your PopUp Pro plugin directory.

    Best Regards,
    Vinod Dalvi

  • Tom
    • Code Wrangler

    Hi Vinod & James,

    i just ran into the same issue after initially copying and replacing the code above i got another error but then i tried downloading and re-uploading the file you provided and it worked perfectly for me.

    Good luck with your one James

    Thanks
    Tom

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.