Skip to content

Commit

Permalink
[BUGFIX] Check if given array element is set and if its value is true (
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk authored Jun 6, 2024
1 parent 474479b commit 780a9a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Domain/Repository/MetadataRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public function findBySettings(array $settings = []): QueryResultInterface

$constraints = [];

if (isset($settings['is_listed'])) {
if (isset($settings['is_listed']) && $settings['is_listed'] == true) {
$constraints[] = $query->equals('is_listed', 1);
}

if (isset($settings['is_sortable'])) {
if (isset($settings['is_sortable']) && $settings['is_sortable'] == true) {
$constraints[] = $query->equals('is_sortable', 1);
}

Expand Down

0 comments on commit 780a9a5

Please sign in to comment.