Title: Error in content boxes
Last modified: September 1, 2018

---

# Error in content boxes

 *  [ginmi](https://wordpress.org/support/users/ginmi/)
 * (@ginmi)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/)
 * Started Getting the following error where the content boxes are supposed to appear
   on the homepage:
 * >  Warning
   >  : count(): Parameter must be an array or an object that implements
   > Countable in …/wp-content/themes/evolve/functions.php on line 244
 * The same Error appears 4 times as I have 4 content boxes on the homepage
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-in-content-boxes%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Romik84](https://wordpress.org/support/users/romik84/)
 * (@romik84)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10646339)
 * This is a PHP version related issue and will be fixed in the next theme version
   soon. Thanks for patience
 *  Thread Starter [ginmi](https://wordpress.org/support/users/ginmi/)
 * (@ginmi)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10646954)
 * Thanks for your prompt reply [@romik84](https://wordpress.org/support/users/romik84/).
 * When is the next version due to be released? I’d like to know that as my homepage
   is currently broken!
 * I am currently on PHP 7.2. will downgrading to 7.1 or 7 provide a temporary fix?
 * Also, I’ve had version 3.9.4 of the theme running on my site for 3 weeks now 
   and haven’t had this problem till now. How come?
 * I haven’t changed PHP versions during this time
 *  [Romik84](https://wordpress.org/support/users/romik84/)
 * (@romik84)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10649356)
 * in **evolve/functions.php** replace line **#243**:
 * `if ( $result ) {`
 * with
 * `if ( $result && ! empty( $result ) && $result != '' ) {`
 * and line **#250**:
 *     ```
       count( $result ) != 0
       && ! ( strpos( $result, 'fas ' ) === 0 )
       ```
   
 * with
 * `! ( strpos( $result, 'fas ' ) === 0 )`
 *  [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10649413)
 * Romik, when I go to edit functions.php — the line numbers are different than 
   you specified.
 * `237 if ( $result ) {`
 * and
 *     ```
       244 count( $result ) != 0
        && ! ( strpos( $result, 'fas ' ) === 0 )
       ```
   
 * I also see the PHP error reported as being line 244. (I get the error message
   in logs but it doesn’t impact site function — but I’m going to try the change
   above at the line numbers I’ve indicated.
 * `
 *  [Romik84](https://wordpress.org/support/users/romik84/)
 * (@romik84)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10649421)
 * [@abigailm](https://wordpress.org/support/users/abigailm/) line numbers might
   change as I did several changes to the file since that change. That’s why I wrote
   the code which need to be changed 😉
 *  Thread Starter [ginmi](https://wordpress.org/support/users/ginmi/)
 * (@ginmi)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10649472)
 * You need to enable content boxes on the homepage [@abigailm](https://wordpress.org/support/users/abigailm/)
   and also make sure your website is running on PHP 7.2 in order to get the error
 * Really curious if you get the same issue so looking forward to your update.
 * Until [@romik84](https://wordpress.org/support/users/romik84/) releases a fix,
   I decided to simply downgrade to PHP 7.1 and the issue is now gone.
 * I thought it’s better to wait for the new version instead of playing manually
   with the theme code (which will be overwritten anyways when the new update is
   released).
 * Be nice if you could release a fix sooner rather than later [@romik84](https://wordpress.org/support/users/romik84/)
   as I prefer to run my site on the latest stable PHP version as it has certain
   benefits over 7.1 when it comes to load speed.
 *  [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10649521)
 * [@ginmi](https://wordpress.org/support/users/ginmi/) – I do have content boxes&
   running PHP 7.2 — and actually this error was reported weeks ago. But it’s a 
   PHP warning, not a fatal error.
 * If you don’t want warnings to display on your site or disrupt function, then 
   you need to correct your wordpress configuration to disable display — see [https://www.wpbeginner.com/wp-tutorials/how-to-turn-off-php-errors-in-wordpress/](https://www.wpbeginner.com/wp-tutorials/how-to-turn-off-php-errors-in-wordpress/)
   for instructions on how to do that.
 * The correction that Romik supplied for functions.php won’t be overridden because
   he’s fixed it for future versions — his instructions above are just describing
   the fix that’s in his development code. So it’s an advance look for those of 
   us who don’t want to wait.
 * He’s probably got other issues he is also working on before releasing the next
   update.
 *  [Romik84](https://wordpress.org/support/users/romik84/)
 * (@romik84)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10649531)
 * [@abigailm](https://wordpress.org/support/users/abigailm/) yes, working on speed
   improvements 😉 and other bugs 😀

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error in content boxes’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/evolve/4.3.7/screenshot.png)
 * evolve
 * [Support Threads](https://wordpress.org/support/theme/evolve/)
 * [Active Topics](https://wordpress.org/support/theme/evolve/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/evolve/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/evolve/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Romik84](https://wordpress.org/support/users/romik84/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/error-in-content-boxes/#post-10649531)
 * Status: not resolved