1
0
Fork 0
mirror of synced 2024-09-30 01:08:13 +13:00

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;
}
$payload = \array_map(function ($property) {
return \str_replace('$', '_', $property);
}, $payload);
foreach ($payload as $key => $value) {
if (\str_starts_with($key, '$')) {
$escapedKey = \str_replace('$', '_', $key);
$payload[$escapedKey] = $value;
unset($payload[$key]);
}
}
$resolve($payload);
}