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
When a variable contains a generic type for which the bound is a union involving string|array<string>, a is_array check does not properly refine the property as being a string in the else branch.
Bug report
When a variable contains a generic type for which the bound is a union involving
string|array<string>
, ais_array
check does not properly refine the property as being a string in the else branch.Code snippet that reproduces the problem
https://phpstan.org/r/f4025a6a-f221-436c-804b-ce7d15d9cab3
Expected output
No error should be reported.
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: