Support » Fixing WordPress » Warning: count(): Parameter must be an array or an object that implements Count

  • I am receiving this error on a client site. The site is running wordpress 5.1.1 and has been an active site for several years. The theme is the same and all plugins are updated. The only changes made were upgrades to the server. At this time I have updated EasyApache to version 4, this site is either PHP 7.2 or 7.1 and MySQL has been upgraded to version 5.7. The error occurs upon adding a new post or updating a post.

    The post does end up live, but the error is occurring regularly.

    The post-template.php is blowing up on what looks to be the page count.

    This is the full error:

    Warning: count(): Parameter must be an array or an object that implements Countable in /home/stmariesnazarene/public_html/wp-includes/post-template.php on line 293

    Warning: Cannot modify header information – headers already sent by (output started at /home/stmariesnazarene/public_html/wp-includes/post-template.php:293) in /home/stmariesnazarene/public_html/wp-admin/post.php on line 222

    Warning: Cannot modify header information – headers already sent by (output started at /home/stmariesnazarene/public_html/wp-includes/post-template.php:293) in /home/stmariesnazarene/public_html/wp-includes/pluggable.php on line 1251

    Warning: Cannot modify header information – headers already sent by (output started at /home/stmariesnazarene/public_html/wp-includes/post-template.php:293) in /home/stmariesnazarene/public_html/wp-includes/pluggable.php on line 1254

    Any help would be greatly appreciated!

    Blessings
    Tam

Viewing 1 replies (of 1 total)
  • Moderator t-p

    (@t-p)

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    If you can install plugins, install “Health Check”: https://wordpress.org/plugins/health-check/ On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.