With no plugins active: Warning: count(): Parameter must be an array or an object that implements Countable in

I am trying to update my site and am using my host’s staging area.

I am getting the above error.

All plugins are deactivated. Theme is up to date.

Host is WPEngine and they don’t allow change to PHP7.1.

Have tried adding debug to config but not seeing a log - don’t know if that’s related to WPEngines setup.

Can you help please? I will provide URL and access in a private post.

Hey @JayPatrol2,

This is a known warning when in PHP 7. Warnings are harmless though and you can hide it by setting WP debug to true in wp-config.php.

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

Then, add this code below that.

// 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 );

That will hide the errors but log them to a debug.log file in the wp-content folder.

Our development team will trace the cause of this warning in due time as they’re systematically working through the task list.

Thanks.

Hi @JayPatrol2

I wanted to let you know this is something WordPress has confirmed to be an issue that should be fixed on their end for PHP 7.2 compatibility. You can follow the progress here: https://core.trac.wordpress.org/ticket/42814

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