-
-
Notifications
You must be signed in to change notification settings - Fork 947
Incorrect array_search() type under certain conditions #7809
Copy link
Copy link
Closed
phpstan/phpstan-src
#1633Description
Bug report
Passing the $strict argument of array_search() from a function reports the possibility of null being returned.
Code snippet that reproduces the problem
https://phpstan.org/r/063ed345-07db-45c1-8b05-0fee820294cd
Expected output
array_search() will never return null in any case.
Did PHPStan help you today? Did it make you happy in any way?
Thanks to PHPStan, various bugs have been prevented. Awesome!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels