diff --git a/src/Php/CompilerBase.php b/src/Php/CompilerBase.php index 52c88080..90cd516b 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -3708,8 +3708,9 @@ class CompilerBase extends \PhpAot\Core\Translator return $left . ' = ' . $object . '.attrRef(' . $prop . ')'; } + } else { + $this->fatalError($expr, 'Cannot assign reference to non-variable'); } - abort($expr); } protected function parseMethodCall(Node\Expr\MethodCall $expr): string