mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Protect possibility of bad get_class call
This commit is contained in:
parent
24d67e9615
commit
8131f806d8
@ -3233,7 +3233,7 @@ class StatementsChecker
|
||||
}
|
||||
}
|
||||
|
||||
if ($stmt->name instanceof PhpParser\Node\Name && $stmt->name->parts === ['get_class']) {
|
||||
if ($stmt->name instanceof PhpParser\Node\Name && $stmt->name->parts === ['get_class'] && $stmt->args) {
|
||||
$var = $stmt->args[0]->value;
|
||||
|
||||
if ($var instanceof PhpParser\Node\Expr\Variable && is_string($var->name)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user