Title: PHP Error when there are no posts
Last modified: August 7, 2018

---

# PHP Error when there are no posts

 *  Resolved [Dev_ua](https://wordpress.org/support/users/dev_ua/)
 * (@dev_ua)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-error-when-there-are-no-posts/)
 * Hello
 * I ran into a problem when there are no posts I see this error on Posts Page:
 * `Warning: count(): Parameter must be an array or an object that implements Countable
   in /var/www/html/wp-includes/post-template.php on line 284`.
 * If there is at least one post all works.
 * WordPress 4.9.8
    Yoast SEO 7.9.1 PHP 7.2
    -  This topic was modified 7 years, 9 months ago by [Dev_ua](https://wordpress.org/support/users/dev_ua/).

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

 *  Plugin Support [Michael Tiña](https://wordpress.org/support/users/mikes41720/)
 * (@mikes41720)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-error-when-there-are-no-posts/#post-10573627)
 * Does the issue occur when all non-Yoast plugins are deactivated and you are using
   a default WP theme like TwentySeventeen?
 * If so, based on the information you provided, we expect this to be a bug. We’re
   actively using the bug tracking on our GitHub repository so your best next step
   would be to create a new issue for our developers at [https://github.com/Yoast/wordpress-seo/issues/new](https://github.com/Yoast/wordpress-seo/issues/new).
   You will need an account to create a new issue.
 * If this is your first bug report, please check out: [https://kb.yoast.com/kb/how-to-write-a-good-bug-report/](https://kb.yoast.com/kb/how-to-write-a-good-bug-report/).
 *  Plugin Support [Michael Tiña](https://wordpress.org/support/users/mikes41720/)
 * (@mikes41720)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-error-when-there-are-no-posts/#post-10594807)
 * No further response, setting to resolved.
 *  Thread Starter [Dev_ua](https://wordpress.org/support/users/dev_ua/)
 * (@dev_ua)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-error-when-there-are-no-posts/#post-10595632)
 * [@mikes41720](https://wordpress.org/support/users/mikes41720/) I found same issue
   on github
    [https://github.com/Yoast/wordpress-seo/issues/10221](https://github.com/Yoast/wordpress-seo/issues/10221)

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

The topic ‘PHP Error when there are no posts’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Dev_ua](https://wordpress.org/support/users/dev_ua/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/php-error-when-there-are-no-posts/#post-10595632)
 * Status: resolved