There was an error while loading. Please reload this page.
1 parent a644b4b commit 6576944Copy full SHA for 6576944
1 file changed
src/Validator/ArrayValidator.php
@@ -38,7 +38,8 @@ public function validate(mixed $value, TypeNode $node, string $context, TypeVali
38
}
39
40
foreach ($value as $k => $v) {
41
- $err = $registry->validate($v, $arrayNode->type, $context . '[' . $k . ']');
+ $keyStr = (\is_scalar($k) || $k === null) ? (string) $k : get_debug_type($k);
42
+ $err = $registry->validate($v, $arrayNode->type, $context . '[' . $keyStr . ']');
43
if ($err !== null) {
44
return $err;
45
0 commit comments