summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-04-21 10:34:24 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-04-23 12:36:12 +0200
commit5a7f023bfc35fa9bc3b24d724541c270db917009 (patch)
treefaf6160cf64e364a793c722ab45536c01ec0d2c9 /lib/private
parenta0c722ad693e4f5ba580b22f720aa00d31504cad (diff)
downloadnextcloud-server-5a7f023bfc35fa9bc3b24d724541c270db917009.tar.gz
nextcloud-server-5a7f023bfc35fa9bc3b24d724541c270db917009.zip
JobList#hasReservedJobs: Close cursor
so Joas doesn't die Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/BackgroundJob/JobList.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index 638919d4c39..3846aed3d61 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -397,7 +397,9 @@ class JobList implements IJobList {
try {
$result = $query->executeQuery();
- return count($result->fetchAll()) > 0;
+ $hasReservedJobs = $result->fetch() !== false;
+ $result->closeCursor();
+ return $hasReservedJobs;
} catch (Exception $e) {
return false;
}