Problem after upgrading to Php 7.2

I upgraded to Php 7.2 just now but i have a message on top of my site now that states:

Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/6/d626394621/htdocs/clickandbuilds/TillPera/wp-includes/post-template.php on line 284

I have deactivated all plugins but the problem still persists without them.

How do i solve the problems? :slight_smile:

1 Like

Hi There,

  1. Which version of Wordpress are you using?

  2. Can you please try removing custom CSS and Javascript from the options or Child Theme and test the case?

If it doesn’t help, you can turn off that warning message by change the define('WP_DEBUG', true); to define('WP_DEBUG', false); under wp-config.php file locates in your root directory.

Let us know how it goes!

  1. I am using Wordpress 4.9.6
  2. I have deleted all CSS and cleared the cache but the problem was still there

I logged into my FTP and looked in the wp-config.php
There was no line like that (search didnt find it) and nothing changed after I added it :frowning:

Hey @Jossstick,

The error is not related to the theme but WordPress itself. It is just a warning though and it could not affect current functionality. You could try hiding errors in WordPress following this guide. Or, try turning off PHP features.

Thanks.

1 Like

Thank you for the help :slight_smile:
Following the guide, i was able to hide the warning.

However i am trying to understand it a bit further to not need help the next time:
What do you mean by

Or, try turning off PHP features.

?

How do i do that?

Thank you in advance :slight_smile:

Hi Jossstick,

I am not sure what Christian meant, but the alternative is to downgrade to version 7.1 of PHP. Version 7.2 is pretty new version and it takes time for WordPress to get compatible.

Needless to say that your case is just a warning and the approach to not show the warning will work with no problem and there is no problem regarding your installation.

Thank you.

1 Like

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