Skip to content

Commit

Permalink
property is not mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Apr 17, 2024
1 parent df06471 commit 613fceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hydra/Serializer/CollectionFiltersNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private function getSearch(string $resourceClass, array $parts, array $filters,
foreach ($filters as $filter) {
foreach ($filter->getDescription($resourceClass) as $variable => $data) {
$variables[] = $variable;
$mapping[] = ['@type' => 'IriTemplateMapping', 'variable' => $variable, 'property' => $data['property'], 'required' => $data['required']];
$mapping[] = ['@type' => 'IriTemplateMapping', 'variable' => $variable, 'property' => $data['property'] ?? null, 'required' => $data['required'] ?? false];
}
}

Expand Down

0 comments on commit 613fceb

Please sign in to comment.