JobList#hasReservedJobs: Close cursor

so Joas doesn't die

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-04-21 10:34:24 +02:00
parent a0c722ad69
commit 5a7f023bfc

View file

@ -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;
}