-
AuthorPosts
-
September 29, 2018 at 10:15 pm #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.
September 30, 2018 at 1:19 am #1016196Hey 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,
MikeSeptember 30, 2018 at 12:15 pm #1016241Hi 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
September 30, 2018 at 1:19 pm #1016253September 30, 2018 at 2:05 pm #1016264Hi,
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,
PeterSeptember 30, 2018 at 3:02 pm #1016280January 9, 2020 at 2:11 pm #1171809oNly 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/
January 9, 2020 at 9:37 pm #1171965Hi 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 -
AuthorPosts
- You must be logged in to reply to this topic.