Title: Php warning on count() on package.module.nextgen_basic_album.php
Last modified: January 3, 2020

---

# Php warning on count() on package.module.nextgen_basic_album.php

 *  Resolved [svart](https://wordpress.org/support/users/svart/)
 * (@svart)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/php-warning-on-count-on-package-module-nextgen_basic_album-php/)
 * 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)

 *  [Mihai Ceban](https://wordpress.org/support/users/mihaiimagely/)
 * (@mihaiimagely)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/php-warning-on-count-on-package-module-nextgen_basic_album-php/#post-12289519)
 * Hi [@svart](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mihai Ceban](https://wordpress.org/support/users/mihaiimagely/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/php-warning-on-count-on-package-module-nextgen_basic_album-php/#post-12289519)
 * Status: resolved