Home » How to fix WordPress, Divi Warning: count(): Parameter must be an array or an object that implements Countable … wp-includes/formatting.php on line 3345

How to fix WordPress, Divi Warning: count(): Parameter must be an array or an object that implements Countable … wp-includes/formatting.php on line 3345

Just a quick blog post to record this problem and how we fixed it. Symptoms: Error message, Warning: count(): Parameter must be an array or an object that implements Countable … wp-includes/formatting.php on line 3345 displayed and page rendering stopped. We’re not sure when this error started, was it caused by by a WordPress update, a Divi update or indeed another plugin? The effect of this error is to stop the wordpress page from being rendered after the featured image. To fix this we have temporarily inserted the following line of code in our child themes functions.php.
/** 
* Dirty fix 
*/

update_option( 'use_smilies', false );
This sets the WordPress option to disabled the expansion of smiles into the relevant unicode characters. Importantly it means that the code path never reaches line 3345 in formatting.php and you don’t get the error. If you know more about this error or a better solution do please get in touch.



You May Also Like…

Find similar blogs in these categories: wordpress
0 Comments
Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.