Hi
regarding this closed post: https://kriesi.at/support/topic/php-7-2-1-issue-on-enfold-4-2/
I’m using Version 4.2.3 and and stil have the same error.
Will it be fixed in a soon update?
Thanks
Hey,
Can you please post FTP and WP admin logins here privately so we can look into it?
Best regards,
Yigit
Hi Ygit
No need to give you access on a production site. This warning is well known (just try to search in Google for: PHP 7.7 count
The Enfold line affected by this warning is:
else if($this->atts['paginate'] == "load_more" && $this->entries->max_num_pages > count($this->entries))
in the file: av-helper-masonry.php
Now look the the official PHP documentation: http://php.net/manual/en/migration72.incompatible.php and search in this documenation page this: “Warn when counting non-countable types” and you will find what cause the warning.
I’m not at all a PHP expert but I suppose that “$this->entries” in an non-countable type.
Thanks
Hi,
I was able to reproduce the issue when i added Masonry element. Please go to enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.php and find following line
else if($this->atts['paginate'] == "load_more" && $this->entries->max_num_pages > count($this->entries))
and change it to following
else if($this->atts['paginate'] == "load_more" && $this->entries->max_num_pages > 1 )
Issue was reported to our devs and a fix will be included in upcoming update :)
Best regards,
Yigit
Thanks Yigit but in the meantim I revert back to PHP 7.1 because Enfold was not the only one to get this warning on count() (Avada too…) So I suppose it’s a little bit to early to run with PHP 7.2 now, anyway it’s good that it will be fixed for the futur :)