Skip to content

Commit a072d48

Browse files
authored
Refs #270, allow denormalization of empty array
1 parent 5c011e6 commit a072d48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Serializer/Denormalizer/RouteCollectionDenormalizer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ public function supportsDenormalization($data, $type, $format = null)
4848
if (!is_array($data)) {
4949
return false;
5050
}
51+
52+
if (count($data) < 1) {
53+
return true;
54+
}
5155

5256
$values = current($data);
5357

0 commit comments

Comments
 (0)