Skip to content

Commit

Permalink
fix(doctrine): OrderFilterTrait - properties null value causing error…
Browse files Browse the repository at this point in the history
… in foreach
  • Loading branch information
thatsLegit authored and soyuka committed Dec 20, 2023
1 parent b1926f5 commit dcce751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doctrine/Common/Filter/OrderFilterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getDescription(string $resourceClass): array
$properties = array_fill_keys($fieldNames, null);
}

foreach ($properties as $property => $propertyOptions) {
foreach ($properties ?? [] as $property => $propertyOptions) {
if (!$this->isPropertyMapped($property, $resourceClass)) {
continue;
}
Expand Down

0 comments on commit dcce751

Please sign in to comment.