File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,7 @@ public function isFunctionSupported(
3030 FunctionReflection $ functionReflection ,
3131 ): bool
3232 {
33- return $ functionReflection ->getName () === 'filter_var '
34- && $ this ->phpVersion ->hasFilterThrowOnFailureConstant ()
35- && $ this ->reflectionProvider ->hasConstant (new Name \FullyQualified ('FILTER_THROW_ON_FAILURE ' ), null );
33+ return $ functionReflection ->getName () === 'filter_var ' ;
3634 }
3735
3836 public function getThrowTypeFromFunctionCall (
@@ -45,6 +43,13 @@ public function getThrowTypeFromFunctionCall(
4543 return null ;
4644 }
4745
46+ if (
47+ !$ this ->phpVersion ->hasFilterThrowOnFailureConstant ()
48+ || !$ this ->reflectionProvider ->hasConstant (new Name \FullyQualified ('FILTER_THROW_ON_FAILURE ' ), null )
49+ ) {
50+ return null ;
51+ }
52+
4853 $ flagsExpr = $ funcCall ->getArgs ()[3 ]->value ;
4954 $ flagsType = $ scope ->getType ($ flagsExpr );
5055
You can’t perform that action at this time.
0 commit comments