Skip to content

Commit

Permalink
JobList#hasReservedJobs: Close cursor
Browse files Browse the repository at this point in the history
so Joas doesn't die

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Apr 21, 2023
1 parent da162c5 commit 75a13f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/BackgroundJob/JobList.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,9 @@ public function hasReservedJob(?string $className = null): bool {

try {
$result = $query->executeQuery();
return count($result->fetchAll()) > 0;
$hasReservedJobs = $result->fetch() !== false;
$result->closeCursor();
return $hasReservedJobs;
} catch (Exception $e) {
return false;
}
Expand Down

0 comments on commit 75a13f2

Please sign in to comment.