Skip to content

Commit 47ff9c2

Browse files
Update NodeScopeResolver.php to prevent null exception
Attempt to prevent null exception on ` $arg->getAttribute ` call
1 parent 4d24016 commit 47ff9c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@
212212
use function in_array;
213213
use function is_array;
214214
use function is_int;
215+
use function is_object;
215216
use function is_string;
216217
use function ksort;
217218
use function sprintf;
@@ -4967,7 +4968,7 @@ private function processArgs(
49674968
}
49684969

49694970
// Attempt to prevent null exception at line 4974 when calling getAttritbute
4970-
if(!isset($arg) && !is_object($arg)) {
4971+
if (!isset($arg) && !is_object($arg)) {
49714972
continue;
49724973
}
49734974

0 commit comments

Comments
 (0)