Skip to content

Commit

Permalink
Set items to array if nothing was found / an error occurred and data …
Browse files Browse the repository at this point in the history
…cannot be set (#10)
  • Loading branch information
pkly authored Mar 29, 2023
1 parent 6374bac commit fe87e7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Service/Resolver/DtoResolverService.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ private function processFind(
} catch (AccessException) {
// noop
} finally {
if ($property->isCollection()) {
$tmp ??= [];
}

$fields[$key] = $tmp;
}
}
Expand Down

0 comments on commit fe87e7e

Please sign in to comment.