mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Add null check
This commit is contained in:
parent
8354b6e055
commit
6cf6d2cfda
@ -108,6 +108,10 @@ class ParseTree
|
||||
}
|
||||
|
||||
do {
|
||||
if ($current_leaf->parent === null) {
|
||||
break;
|
||||
}
|
||||
|
||||
$current_leaf = $current_leaf->parent;
|
||||
} while (!$current_leaf instanceof ParseTree\EncapsulationTree
|
||||
&& !$current_leaf instanceof ParseTree\CallableTree
|
||||
|
Loading…
Reference in New Issue
Block a user