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
As of PHP 7.2, count() only receives an array or a class that implements Countable, and throws an exception when it encounters another type.
We look at line 1186 (2.0.10) or line 1188 (master), if $column is a string at this time, then an exception will be thrown.
As we all know, in future versions of PHP, parameter type restrictions will become more stringent.
My Solution:
Check whether the $column is an array before counting it.
for example:
What steps will reproduce the problem?
As of PHP 7.2,
count()
only receives an array or a class that implements Countable, and throws an exception when it encounters another type.We look at line 1186 (2.0.10) or line 1188 (master), if
$column
is a string at this time, then an exception will be thrown.As we all know, in future versions of PHP, parameter type restrictions will become more stringent.
My Solution:
Check whether the
$column
is an array before counting it.for example:
Additional info
The text was updated successfully, but these errors were encountered: