Warning: count(): error after site migration to SiteGround hosting

Hi

After moving my site to another host (SiteGround) I get the following error on the first image of every page and post.

Warning: count(): Parameter must be an array or an object that implements Countable in /home/icompare/public_html/easylawnmowing.co.uk/wp-includes/media.php on line 1206

I have added the following to my wp-config.php file but still get the error.

define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_DISPLAY’, false);

I am accessing the new site via DNS in my local host file so you will not see this on the current live site.

Can you help please?

Many thanks
Mark

Hey Mark,

Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

Hi Jade

Secure note has been added with requested details.

Many thanks
Mark

Hi there,

It shouldn’t trigger a warning even if you enabled WP_DEBUG since the count result should be always valid. What I’m seeing is database related, please contact your hosting provider and have the database erros be fixed. The errors are available in php_errorlog file of your site, within your FTP.

Forcing the error reporting to 0 isn’t working too, perhaps your host has global configuration when it comes to error display.

Thanks!

All sorted - updated PHP to latest version v7.1.13 and it removed the error.

Many thanks
Mark

Glad you’ve sorted it out :slight_smile:

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