diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-04-21 10:34:24 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-04-23 12:36:12 +0200 |
commit | 5a7f023bfc35fa9bc3b24d724541c270db917009 (patch) | |
tree | faf6160cf64e364a793c722ab45536c01ec0d2c9 /lib/private | |
parent | a0c722ad693e4f5ba580b22f720aa00d31504cad (diff) | |
download | nextcloud-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.php | 4 |
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; } |