• Resolved svart

    (@svart)


    In find that I get some warnings on albums pages with PHP 7.2.1

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in [redacted]/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php on line 67

    which is

    if (count($ids) == 1 && strpos($ids[0], 'a') !== 0) {

    Just replace it with

    if (is_array($ids) && count($ids) == 1 && strpos($ids[0], 'a') !== 0) {

    and the problem is solved.

    I would suggest to do it in your codebase so I wouldn’t have to manually edit at each update.

    Nice plugin BTW !

Viewing 1 replies (of 1 total)
  • Hi @svart,

    Thank you very much for the input. Looks like a valid fix to me so I will be happy to forward it for our developers and hope that it will get fixed in one of the future NextGen Gallery plugin updates.

    Best Regards!

Viewing 1 replies (of 1 total)

The topic ‘Php warning on count() on package.module.nextgen_basic_album.php’ is closed to new replies.