Skip to content

Commit

Permalink
[TASK] Make AbstractUpdate v13 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
bnf committed Oct 17, 2024
1 parent 845aae1 commit 6ff3fa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/Updates/AbstractUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace T3G\AgencyPack\Blog\Updates;

use T3G\AgencyPack\Blog\Updates\Criteria\CriteriaInterface;
use T3G\AgencyPack\Blog\Updates\Criteria\EqualIntCriteria;
use T3G\AgencyPack\Blog\Updates\Criteria\EqualStringCriteria;
use T3G\AgencyPack\Blog\Updates\Criteria\InCriteria;
Expand Down Expand Up @@ -119,9 +120,9 @@ protected function getRecordsByCriteria(QueryBuilder $queryBuilder, string $tabl
$queryBuilder->select('*');
$queryBuilder->from($table);
if ($condition === self::CONDITION_AND) {
$queryBuilder->where(...$criteria);
$queryBuilder->where(...array_map(static fn (CriteriaInterface $criterion): string => (string)$criterion, $criteria));
} else {
$queryBuilder->orWhere(...$criteria);
$queryBuilder->orWhere(...array_map(static fn (CriteriaInterface $criterion): string => (string)$criterion, $criteria));
}

$result = $queryBuilder->executeQuery();
Expand Down

0 comments on commit 6ff3fa7

Please sign in to comment.