Title: Error when table is empty
Last modified: July 4, 2020

---

# Error when table is empty

 *  Resolved [danniee](https://wordpress.org/support/users/danniee/)
 * (@danniee)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/)
 * Hi,
 * I use filters to display tables/rows. If there is no match for the filter and
   table is empty, a php error is displayed in my header as such:
 * Warning: count(): Parameter must be an array or an object that implements Countable
   in /home/www/mysite.com/public_html/wp-content/plugins/tablepress/classes/class-
   evaluate.php on line 73

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13072479)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Can you explain what filters you mean here? What Shortcode are you using?
 * Regards,
    Tobias
 *  Thread Starter [danniee](https://wordpress.org/support/users/danniee/)
 * (@danniee)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13072686)
 * Hi,
 * By filter, I mean I have a hidden column where I add “keywords”. Then I use the
   filter function in tablepress to only display rows that have that keyword.
 * A shortcode can look like this:
 * [table id=62 filter=”redjackets” hide_columns=”5″ /]
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13074801)
 * Hi,
 * ok, I see. Thanks the letting me know! I’ll have to add some protection against
   such errors here.
 * In the meantime, I can only suggest to only use filters that return at least 
   one row… Sorry.
 * Regards,
    Tobias
 *  Thread Starter [danniee](https://wordpress.org/support/users/danniee/)
 * (@danniee)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13074895)
 * Ok, no problem. I’ll just keep an eye out for an update then. Thanks for all 
   the great work with your amazing plugin [@tobiasbg](https://wordpress.org/support/users/tobiasbg/)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13076098)
 * Hi,
 * sure, no problem!
 * Best wishes,
    Tobias
 *  [zesgar](https://wordpress.org/support/users/zesgar/)
 * (@zesgar)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13373788)
 * Any update on this? This would be really nice to not through a php error. We 
   have a list of product ID’s we are running this against in another table to display
   nutritional facts per product. For products with no nutritional information, 
   we do not have an ID in our table. It would be nice if the table just returned
   no rows instead of an error. Thanks!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13375181)
 * Hi zesgar,
 * no, sorry, I don’t yet have a solution for this, as I was very busy the last 
   months. If someone wants to step up and offer help, I’d really appreciate it!
 * Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error when table is empty’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/error-when-table-is-empty/#post-13375181)
 * Status: resolved