-
-
Notifications
You must be signed in to change notification settings - Fork 947
Not null affectation does not define variable #4662
Copy link
Copy link
Open
Labels
Milestone
Description
Bug report
In a if statement, I first check that affectation of a variable is not NULL, and then try to use the variable in a second part of the condition. PHPStan output an error like Undefined variable: $affectedVar.
It could be related to #4357.
Code snippet that reproduces the problem
Expected output
In the above example, PHPStan should not output that $programStartDate is undefined at line 22.
Reactions are currently unavailable