-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#4323Closed
Copy link
Labels
Milestone
Description
Bug report
https://www.php.net/manual/en/function.mb-convert-encoding.php
Function returns false on error. I checked phpstan-src, and it does have the correct return type there (string|array|false), but in reality, phpstan reports identical.alwaysFalse.
This particular case can happen when there are certain unicode characters in the input, so we want to check if it is false specifically.
Code snippet that reproduces the problem
https://phpstan.org/r/e833d30c-5c4c-448c-9f1e-98d611a3e691
Expected output
No error.
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable