Warning: Invalid argument supplied for foreach() in /home/harmonya/public_html/wp-content/plugins/p

Just upgraded the PopUp Pro plugin and am getting this error at the top of the screen

  • Jude
    • DEV MAN

    Hey @gfawcett,

    Thanks for bringing this to our attention, I have marked the developer for his attention on the Warning message. It does not affect the functionality of the plugin itself, you can turn it off as shown here.

    http://aristeides.com/blog/wp-hide-php-errors

    OR

    pc-freak.net/blog/turn-php-notices/

    Also can you add this css to the plugin to see if the length issue gets fixed ?

    .wdpu-12187 .wdpu-msg-inner,
    .wdpu-12187.no-img .wdpu-text ,
    .wdpu-12187 .wdpu-inner {
        height:inherit ;
    }

    Cheers
    Jude

  • gfawcett
    • WPMU DEV Initiate

    From my IT Guy...

    Hey Greg!

    I was unable to disable errors, but I patched the plugin on your site (you can pass this along to the author, if you want):

    I changed the code on lines 190 – 192 of popover/inc/class-popup-public.php to the following:
    if(!empty($popup_data['popup'])){
    foreach ( $popup_data['popup'] as $item ) {
    $this->enqueued[] = $item['html_id'];
    }
    }

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

    Everything seems fine and working now.

    You might also tell the author to test with WP_DEBUG on, before pushing out an update :wink:

    Best,
    Richard

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.