Skip to content

Commit b1a09a5

Browse files
committed
Fix FiberScope with dynamic variable names
1 parent 0e710ab commit b1a09a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,12 @@ public function processExprNode(
25922592
$impurePoints = [];
25932593
$isAlwaysTerminating = false;
25942594
if ($expr->name instanceof Expr) {
2595-
return $this->processExprNode($stmt, $expr->name, $scope, $storage, $nodeCallback, $context->enterDeep());
2595+
$result = $this->processExprNode($stmt, $expr->name, $scope, $storage, $nodeCallback, $context->enterDeep());
2596+
$hasYield = $result->hasYield();
2597+
$throwPoints = $result->getThrowPoints();
2598+
$impurePoints = $result->getImpurePoints();
2599+
$isAlwaysTerminating = $result->isAlwaysTerminating();
2600+
$scope = $result->getScope();
25962601
} elseif (in_array($expr->name, Scope::SUPERGLOBAL_VARIABLES, true)) {
25972602
$impurePoints[] = new ImpurePoint($scope, $expr, 'superglobal', 'access to superglobal variable', true);
25982603
}

0 commit comments

Comments
 (0)