Problem with PHP 7.2 for Pro & X

Hello,

I’m using Pro on multisite installation.
Pro version: latest
Wordpress version: latest
PHP 7.2

Website: https://www.epsacongress.com/

I have several other themes but I get this error only with X & Pro when activating PHP 7.2

`

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

`
Searched for a fix but it seems only can be fixed by theme devs
referring to this discussion
https://core.trac.wordpress.org/ticket/42814#comment:57

Regards,
Qored

Hi @Qored

I couldn’t replicate this issue using PHP 7.2.5, I can see WordPress team are working on fixing this issue, meanwhile it’s just a warning and shouldn’t be displayed on the front-end, to make sure it’s not being displayed on front-end, you can edit wp-config.php file and make sure WP_DEBUG is set to false, or simply replace this line:

define('WP_DEBUG', true);

with:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

this will make sure to hide the errors/warnings on front-end and log them in a file called debug.log in (wp-content) folder.

Thanks.

1 Like

Thanks Alaa, it looks fine now.

You’re welcome!
We’re glad we were able to help you out.

1 Like

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