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 new object is assigned to a new variable and during construction of the object an exception is thrown, phpstan still assumes that the variable is assigned (set) and therefore isset would always return true. At least this is true for below snippet. However, this code works fine: https://phpstan.org/r/a757f959-eecc-484b-ad70-22caab81bc16
Bug report
Using latest version!
When a new object is assigned to a new variable and during construction of the object an exception is thrown, phpstan still assumes that the variable is assigned (set) and therefore isset would always return true. At least this is true for below snippet. However, this code works fine:
https://phpstan.org/r/a757f959-eecc-484b-ad70-22caab81bc16
Code snippet that reproduces the problem
https://phpstan.org/r/3e472af1-0c34-4873-8b5f-7923419afef1
Expected output
No issue should be reported
The text was updated successfully, but these errors were encountered: