mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix GH-18108 gen_stub: Using $this when not in object context
This commit is contained in:
@@ -2174,7 +2174,7 @@ class EvaluatedValue
|
||||
static function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) {
|
||||
// $expr is a ConstFetch with a name of a C macro here
|
||||
if (!$expr instanceof Expr\ConstFetch) {
|
||||
throw new Exception($this->getVariableTypeName() . " " . $this->name->__toString() . " has an unsupported value");
|
||||
throw new Exception("Expression at line " . $expr->getStartLine() . " must be a global, non-magic constant");
|
||||
}
|
||||
|
||||
$constName = $expr->name->__toString();
|
||||
|
||||
Reference in New Issue
Block a user