Skip to content

Commit

Permalink
Use is_iterable instead of is_array
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgt9 authored Mar 20, 2020
1 parent b3e71fe commit ac8afce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Serializer/AbstractSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function serializeRecursively($value, int $_depth = 0)
return $this->serializeCallableWithoutTypeHint($value);
}

if (\is_array($value)) {
if (\is_iterable($value)) {
$serializedArray = [];

foreach ($value as $k => $v) {
Expand Down

0 comments on commit ac8afce

Please sign in to comment.