Title: PHP Error Array with Count &#8211; PHP 7.2
Last modified: November 20, 2018

---

# PHP Error Array with Count – PHP 7.2

 *  Resolved [burtcav](https://wordpress.org/support/users/burtcav/)
 * (@burtcav)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-error-array-with-count-php-7-2/)
 * We are getting a redundent php error that causes our error log files to grow 
   well over 1gb on all our sites. The error is this:
 * [20-Nov-2018 22:27:12 UTC] PHP Warning: count(): Parameter must be an array or
   an object that implements Countable in /home/michiganlifeltg/public_html/MICHIGANHORSEPROPERTY.
   COM/wp-content/plugins/flexmls-idx/pages/listing-details.php on line 634
 * The code on line 634 is this:
 *  if ( count($sf[‘Rooms’] > 0) ) {
 *  foreach ($sf[‘Rooms’] as $r) {
 *  foreach ($r[‘Fields’] as $rf) {
    foreach ($rf as $rfk => $rfv) {
 *  $label = null;
 * Research is telling me this might be tied to PHP 7.2.
 * Any help to eliminate these errors on our 11 websites would be much appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-array-with-count-php-7-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Matt_flexmlsIDX](https://wordpress.org/support/users/matt_flexmlsidx/)
 * (@matt_flexmlsidx)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-error-array-with-count-php-7-2/#post-10907666)
 * [@burtcav](https://wordpress.org/support/users/burtcav/)
 * Could you shoot me an email? mattf at flexmls dot com
 * I have submitted this as a bug to the developers. I do have a workaround file
   you could use in the meantime. It appears PHP version 7.2 is a little more strict
   with the count() function and that’s why the warning is being thrown.

Viewing 1 replies (of 1 total)

The topic ‘PHP Error Array with Count – PHP 7.2’ is closed to new replies.

 * ![](https://ps.w.org/flexmls-idx/assets/icon.svg?rev=2617426)
 * [Flexmls® IDX Plugin](https://wordpress.org/plugins/flexmls-idx/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flexmls-idx/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flexmls-idx/)
 * [Active Topics](https://wordpress.org/support/plugin/flexmls-idx/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flexmls-idx/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flexmls-idx/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Matt_flexmlsIDX](https://wordpress.org/support/users/matt_flexmlsidx/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/php-error-array-with-count-php-7-2/#post-10907666)
 * Status: resolved