Skip to content

Commit 1b9ff65

Browse files
committed
fix: crash on accessing $currentJob before initialization
1 parent 611891b commit 1b9ff65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Queue/RabbitMQQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ protected function getRandomId(): string
577577
*/
578578
public function close(): void
579579
{
580-
if (! $this->currentJob->isDeletedOrReleased()) {
580+
if (isset($this->currentJob) && ! $this->currentJob->isDeletedOrReleased()) {
581581
$this->reject($this->currentJob, true);
582582
}
583583

0 commit comments

Comments
 (0)