Skip to content

Commit cda3f82

Browse files
authored
Merge pull request vyuldashev#543 from oprudkyi/issue/crash_on_accessing_currentJob_before_initialization
fix: crash on accessing $currentJob before initialization
2 parents 611891b + 1b9ff65 commit cda3f82

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)