Fix key replacements

This commit is contained in:
Jake Barnby 2022-09-21 18:24:47 +12:00
parent 544413dddf
commit 5cefda4ff2
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -249,9 +249,13 @@ class Resolvers
return; return;
} }
$payload = \array_map(function ($property) { foreach ($payload as $key => $value) {
return \str_replace('$', '_', $property); if (\str_starts_with($key, '$')) {
}, $payload); $escapedKey = \str_replace('$', '_', $key);
$payload[$escapedKey] = $value;
unset($payload[$key]);
}
}
$resolve($payload); $resolve($payload);
} }