Skip to content

Commit 4eb91d0

Browse files
committed
JobList#hasReservedJobs: Close cursor
so Joas doesn't die Signed-off-by: Marcel Klehr <[email protected]>
1 parent fded6e1 commit 4eb91d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/private/BackgroundJob/JobList.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ public function hasReservedJob(?string $className = null): bool {
397397

398398
try {
399399
$result = $query->executeQuery();
400-
return count($result->fetchAll()) > 0;
400+
$hasReservedJobs = $result->fetch() !== false;
401+
$result->closeCursor();
402+
return $hasReservedJobs;
401403
} catch (Exception $e) {
402404
return false;
403405
}

0 commit comments

Comments
 (0)