Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » Invalid argument supplied for foreach() in module error

  • Resolved alyab

    (@alyab)


    Hi,

    The current plugin version is 3.11 and I have this error below.

    Warning: Invalid argument supplied for foreach() in /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php on line 108

    I tried to disable all plugins except for this one, the error is still there. Then I tried to switch my theme to twentytwent-one the error seems to disappear.

    I really don’t plan on switching my theme just for this error though.

    Funny thing is if I switch my PHP version to PHP 5.6.40, there’s no error. When I switch back to PHP 7 this error appears.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter alyab

    (@alyab)

    Actually even after I switch back to PHP 5.6.40 the error is still there. Sorry my mistake.

    This error appears after I upgrade my PHP version 5 to version 7. Now even when I switch back to 5 the error is still there.

    Plugin Author Imagely

    (@imagely)

    Hi @alyab,

    This appears to be a newly introduced problem. We have followed up with our developer and I am pretty sure that he will take care of the warning and it is going to be resolved in the following NGG update.

    In the meantime as a workaround you can edit wp-config.php file and replace the following line of code to hide all the Warning and Notices from your site’s pages:

    define('WP_DEBUG', false);

    with these:

    
    ini_set('display_errors','Off');
    define('WP_DEBUG', false);
    define('WP_DEBUG_DISPLAY', false);
    
    Thread Starter alyab

    (@alyab)

    Hi @imagely ,

    The code to hide the error works. Will wait for the next update.

    I’ll mark this as resolved for now, thanks!

    hashah3

    (@hashah3)

    Hi there, I am new to WordPress development.
    Where do I find the “wp-config.php” file on my wordpress admin view?

    Thanks

    Thread Starter alyab

    (@alyab)

    @hashah3 you can find it in your root folder of your website. You need to access your hosting account and the find the files there.

    hashah3

    (@hashah3)

    OK, I use WordPress with IONOS as the Hosting compnay, and IONOS actually provides a way to access the web site files, so I am OK now.

    Many thanks

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