**Warning** 404 error

I’m getting the following error at the top of my 404 pages. I had previously contacted Themco support (ticket 71428) regarding this and was told that it was a known problem that would be corrected, however the bug is still there.

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

You can see the error here:

https://realfoodrecharge.com/welcomfe/

All of my plugins are up to date and I’m using version 7.2.3 of the X-Theme

Thanks,
Mike

Hey Mike,

It’s not just our theme that’s having this but this is a known issue even with popular plugins such as WooCommerce. This is because of PHP 7+.

It’s recommended that you turn off the display of errors in your live site but keep a log of errors. To do that, follow the debugging suggestion of WordPress here: https://wordpress.org/support/article/debugging-in-wordpress/

Your wp-config.php debug setup should look like the following code.

 // Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

  // Enable Debug logging to the /wp-content/debug.log file
  define( 'WP_DEBUG_LOG', true );

  // Disable display of errors and warnings 
  define( 'WP_DEBUG_DISPLAY', false );
  @ini_set( 'display_errors', 0 );

If you’re not comfortable with coding, you might want to ask your host if they could implement that for you.

Hope that helps.

Thanks Christian!

We are delighted to assist you with this.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.