You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to the php 7.x changes themselves, where count() can no longer be passed nulls. Unfortunately the only workaround that I am aware of is to also add a !empty($var) as well, or ensure the var is always countable, even if it is an empty array. Not sure if that will work for your situation.
count() has been changed with PHP 7.2. See http://php.net/manual/en/migration72.incompatible.php
It does only accept arrays or objects that implement Countable.
For that reason the |count modifier fails if the variable is unassigned or has a value of NULL.
Warning: count(): Parameter must be an array or an object that implements Countable in ....
{$c = $var|count}
The text was updated successfully, but these errors were encountered: