Skip to content

Commit c228724

Browse files
committed
Fix list type in non-strict types
1 parent 0dbc045 commit c228724

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Type/ListType.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ public function __construct(
2525
public function match(mixed $value, Context $context): bool
2626
{
2727
if ($context->isDenormalization()) {
28-
return \is_array($value) && \array_is_list($value);
28+
if ($context->isStrictTypesEnabled()) {
29+
return \is_array($value) && \array_is_list($value);
30+
}
31+
32+
return \is_array($value);
2933
}
3034

3135
return \is_iterable($value);

0 commit comments

Comments
 (0)