Title: PHP 7.2 count(null) problem
Last modified: February 28, 2018

---

# PHP 7.2 count(null) problem

 *  Resolved [trolinof](https://wordpress.org/support/users/trolinof/)
 * (@trolinof)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-7-2-countnull-problem/)
 * Hello,
    Please how to fix PHP 7.2 count problem?
 * Warning: count(): Parameter must be an array or an object that implements Countable
   in
    `beautiful-taxonomy-filters/public/class-beautiful-taxonomy-filters-public.
   php on line 326`
 * This line:
    `return ( count($postcount_query->posts > 0) ? count($postcount_query-
   >posts) : 0 );` Thank you!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jonathandejong](https://wordpress.org/support/users/jonathandejong/)
 * (@jonathandejong)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/php-7-2-countnull-problem/#post-10185267)
 * Hi,
 * I dont think its specific to PHP 7.2 but rather I need to add an ! empty check
   before doing the count.
 * I’ll be sure to fix it for the next version 🙂

Viewing 1 replies (of 1 total)

The topic ‘PHP 7.2 count(null) problem’ is closed to new replies.

 * ![](https://ps.w.org/beautiful-taxonomy-filters/assets/icon-256x256.png?rev=1654967)
 * [Beautiful taxonomy filters](https://wordpress.org/plugins/beautiful-taxonomy-filters/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/beautiful-taxonomy-filters/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/)
 * [Active Topics](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jonathandejong](https://wordpress.org/support/users/jonathandejong/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/php-7-2-countnull-problem/#post-10185267)
 * Status: resolved