Skip to content

Commit cb575b1

Browse files
committed
Fix GH-18108 gen_stub: Using $this when not in object context
1 parent 3b87093 commit cb575b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: build/gen_stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,7 @@ public function enterNode(Node $expr)
21742174
static function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) {
21752175
// $expr is a ConstFetch with a name of a C macro here
21762176
if (!$expr instanceof Expr\ConstFetch) {
2177-
throw new Exception($this->getVariableTypeName() . " " . $this->name->__toString() . " has an unsupported value");
2177+
throw new Exception("Expression at line " . $expr->getStartLine() . " must be a global, non-magic constant");
21782178
}
21792179

21802180
$constName = $expr->name->__toString();

0 commit comments

Comments
 (0)