@@ -175,7 +175,7 @@ public function specifyTypesInCondition(
175175 $ exprNode = $ expressions [0 ];
176176 /** @var ConstantScalarType $constantType */
177177 $ constantType = $ expressions [1 ];
178- if ($ constantType ->getValue () === false ) {
178+ if (! $ context -> null () && $ constantType ->getValue () === false ) {
179179 $ types = $ this ->create ($ exprNode , $ constantType , $ context , false , $ scope , $ rootExpr );
180180 return $ types ->unionWith ($ this ->specifyTypesInCondition (
181181 $ scope ,
@@ -185,7 +185,7 @@ public function specifyTypesInCondition(
185185 ));
186186 }
187187
188- if ($ constantType ->getValue () === true ) {
188+ if (! $ context -> null () && $ constantType ->getValue () === true ) {
189189 $ types = $ this ->create ($ exprNode , $ constantType , $ context , false , $ scope , $ rootExpr );
190190 return $ types ->unionWith ($ this ->specifyTypesInCondition (
191191 $ scope ,
@@ -339,7 +339,7 @@ public function specifyTypesInCondition(
339339 $ exprNode = $ expressions [0 ];
340340 /** @var ConstantScalarType $constantType */
341341 $ constantType = $ expressions [1 ];
342- if ($ constantType ->getValue () === false || $ constantType ->getValue () === null ) {
342+ if (! $ context -> null () && ( $ constantType ->getValue () === false || $ constantType ->getValue () === null ) ) {
343343 return $ this ->specifyTypesInCondition (
344344 $ scope ,
345345 $ exprNode ,
@@ -348,7 +348,7 @@ public function specifyTypesInCondition(
348348 );
349349 }
350350
351- if ($ constantType ->getValue () === true ) {
351+ if (! $ context -> null () && $ constantType ->getValue () === true ) {
352352 return $ this ->specifyTypesInCondition (
353353 $ scope ,
354354 $ exprNode ,
0 commit comments