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
PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /var/www/html/site/vendor/klein/klein/src/Klein/DataCollection/DataCollection.php on line 135
I am running PHP version 7.2.5 And I get the warning consistently when hitting routes where I use GET parameters.
So I went into DataCollection.php and found the all() function that seemed to be causing the problem.
I var_dump($mask) just before it is passed into array_flip(). To my surprise, I see that one of the values passed in is actually a BOOLEAN (false).
PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /var/www/html/site/vendor/klein/klein/src/Klein/DataCollection/DataCollection.php on line 135
I am running PHP version 7.2.5 And I get the warning consistently when hitting routes where I use GET parameters.
So I went into DataCollection.php and found the all() function that seemed to be causing the problem.
I var_dump($mask) just before it is passed into array_flip(). To my surprise, I see that one of the values passed in is actually a BOOLEAN (false).
I did not use that as part of my mask, but I notice that the mask is modified within the function, the rest of the function arguments are added in.
So I went over to Request.php, lines 282 thru 285 (the params() function)
There it is! A boolean is being passed in.
The text was updated successfully, but these errors were encountered: