Skip to content

Commit 724d603

Browse files
committed
Don't wrap global lookups in _G when there's a . in the global lookup name
1 parent af5495c commit 724d603

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/XmlFileParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private function childHasInterestingData(Frame $child): bool
193193

194194
private function wrapInGIfNeeded(string $name): string
195195
{
196-
if (!preg_match('/^[A-z][A-z0-9]*$/', $name)) {
196+
if (!preg_match('/^[A-z][.A-z0-9]*$/', $name)) {
197197
// json_encode adds and properly escapes quotes
198198
return '_G[' . json_encode($name) . ']';
199199
}

0 commit comments

Comments
 (0)