From 6595d23f0ec7b576bc9b504f4098ee98b624c8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Sun, 19 Jan 2025 15:01:54 +0000 Subject: [PATCH] fixed empty argument issue for jobs and jobQueue.. --- app/Abstracts/Job.php | 4 ++++ app/Abstracts/JobShouldQueue.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/Abstracts/Job.php b/app/Abstracts/Job.php index 841e3ca10..2a95d19e5 100644 --- a/app/Abstracts/Job.php +++ b/app/Abstracts/Job.php @@ -71,6 +71,10 @@ abstract class Job $this->model = $arguments[0]; } + if (empty($arguments[1])) { + $arguments[1] = []; + } + $request = $this->getRequestInstance($arguments[1]); if ($request instanceof Request) { $this->request = $request; diff --git a/app/Abstracts/JobShouldQueue.php b/app/Abstracts/JobShouldQueue.php index e99d66917..5fcf20c58 100644 --- a/app/Abstracts/JobShouldQueue.php +++ b/app/Abstracts/JobShouldQueue.php @@ -75,6 +75,10 @@ abstract class JobShouldQueue implements ShouldQueue $this->model = $arguments[0]; } + if (empty($arguments[1])) { + $arguments[1] = []; + } + $request = $this->getRequestInstance($arguments[1]); if ($request instanceof QueueCollection) { $this->request = $request;