Check if $node->stmts has a null value

This commit is contained in:
Jaapze 2020-01-09 12:59:18 +01:00 committed by GitHub
parent a1754b38ce
commit 13ed8437b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ PHP
return null;
}
if (count((array) $node->stmts) !== 1) {
if ($node->stmts === null || count((array) $node->stmts) !== 1) {
return null;
}