aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/BackgroundJob
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-07-04 11:26:17 +0200
committerJoas Schilling <coding@schilljs.com>2024-07-19 11:21:16 +0200
commiteeb6ddb176adc7488b74d004dceafee960603ebc (patch)
tree50c3bf5d7d1df99c9ea661f68eaded03b6dac3f4 /lib/private/BackgroundJob
parente45465781f1d9d6d64501dee46c8f4b4704e5918 (diff)
downloadnextcloud-server-eeb6ddb176adc7488b74d004dceafee960603ebc.tar.gz
nextcloud-server-eeb6ddb176adc7488b74d004dceafee960603ebc.zip
fix(db): Deprecate `IExpressionBuilder::or()` and `IExpressionBuilder::and()` without parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/BackgroundJob')
-rw-r--r--lib/private/BackgroundJob/JobList.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index 5aaf14d62e7..b09124281ea 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -203,12 +203,12 @@ class JobList implements IJobList {
$query->andWhere($query->expr()->eq('time_sensitive', $query->createNamedParameter(IJob::TIME_SENSITIVE, IQueryBuilder::PARAM_INT)));
}
- if ($jobClasses !== null && count($jobClasses) > 0) {
- $orClasses = $query->expr()->orx();
+ if (!empty($jobClasses)) {
+ $orClasses = [];
foreach ($jobClasses as $jobClass) {
- $orClasses->add($query->expr()->eq('class', $query->createNamedParameter($jobClass, IQueryBuilder::PARAM_STR)));
+ $orClasses[] = $query->expr()->eq('class', $query->createNamedParameter($jobClass, IQueryBuilder::PARAM_STR));
}
- $query->andWhere($orClasses);
+ $query->andWhere($query->expr()->orX(...$orClasses));
}
$result = $query->executeQuery();