Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1016179

    Hi,
    I have encountered a “Warning: count(): Parameter must be an array ……

    I updated to PHP 7.2 some time ago and have only just realised the error.
    The site is the top level of a multi-site (I can’t even remember how on earth I created this)
    I don’t know where to turn off PHP error messages.
    Can you help point me in the right direction of how to correct this?
    Rolling back to a previous PHP version I encounter lots more error messages on all pages including the dashboard.
    Link is below in private.

    Thanks in advance.

    #1016196

    Hey Heathcliffe,
    Probably the best source for how to turn off PHP error messages will be your webhost, as they know your configuration best.
    But here is How to turn off PHP error reporting that may work for you.
    I researched your error and believe it could be this one
    where downgrading the server to PHP 7.1 should solve the problem.
    Also read this post Please ensure you have the latest version of Enfold, as this is a old issue.
    Please let us know if this helped.

    Best regards,
    Mike

    #1016241

    Hi Mike,

    Thanks for the info. I would have no idea if I had the latest version or not because they do not update the Themforrest Changelog. The last update was May 22 2018 4.4 yet I think there is a 4.4.1 out. I despair over this.

    I did downgrade the PHP version as mentioned, but this caused a whole host of other issues. But I will try update the theme files and then roll back.
    Many thanks for the reply.

    H

    #1016253

    @Mike,

    I had to downgrade to PHP 5.6.38 to remove the error message.

    • This reply was modified 6 years, 2 months ago by Cliffy.
    #1016264

    Hi,

    Please try to replace line 213 in enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.php

    
    $hide 	= count($display_terms) <= 1 ? "hidden" : "";
    

    with

    
    $hide 	= ( !is_array($display_terms) || count($display_terms) <= 1 ) ? "hidden" : "";
    

    – this should fix the error. I’ll ask the developers to include the fix with the next update.

    Best regards,
    Peter

    #1016280

    Thanks @dude

    I’ll keep it on the current PHP and wait for the update ;)

    H

    #1171809

    oNly a warning but:

    [Thu Jan 09 13:04:49.468445 2020]

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/twaudio.de/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.php on line 366, referer: https://www.twaudio.de/en/products/b-series/

    #1171965

    Hi hunter74,

    Which version on Enfold are you running?

    https://kriesi.at/support/topic/php-7-2-1-issue-on-enfold-4-2/

    Best regards,
    Victoria

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.