Skip to content

Commit

Permalink
minor Sylius#16135 Add empty array check in ZoneRepository (mpysiak)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13                  |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | n/a                      |
| License         | MIT                                                          |

Adds empty array check
 

Commits
-------
  Add empty array check
  • Loading branch information
Wojdylak authored Apr 18, 2024
2 parents 6c535a9 + 4bf1c45 commit 14a5bfe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ public function createByAddressQueryBuilder(AddressInterface $address, ?string $
$queryBuilder->setParameter('provinceCode', $address->getProvinceCode());
}

$queryBuilder->andWhere($queryBuilder->expr()->orX(...$orConditions));
if ($orConditions !== []) {
$queryBuilder->andWhere($queryBuilder->expr()->orX(...$orConditions));
}

return $queryBuilder;
}
Expand Down

0 comments on commit 14a5bfe

Please sign in to comment.