aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/BackgroundJob/JobList.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/BackgroundJob/JobList.php')
-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();