From 76bcf4909758db3054d8fd2e66132c7897654a18 Mon Sep 17 00:00:00 2001 From: Christoph Beyer Date: Fri, 13 Aug 2021 22:52:15 +0200 Subject: [PATCH 1/3] Check for incomplete class to prevent unexpected error when class cannot be loaded --- src/Illuminate/Queue/Console/RetryCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/Console/RetryCommand.php b/src/Illuminate/Queue/Console/RetryCommand.php index 0c6dfac7ce10..23a5ae727a6a 100644 --- a/src/Illuminate/Queue/Console/RetryCommand.php +++ b/src/Illuminate/Queue/Console/RetryCommand.php @@ -171,7 +171,7 @@ protected function refreshRetryUntil($payload) throw new RuntimeException('Unable to extract job payload.'); } - if (is_object($instance) && method_exists($instance, 'retryUntil')) { + if (is_object($instance) && !($instance instanceof \__PHP_Incomplete_Class) && method_exists($instance, 'retryUntil')) { $retryUntil = $instance->retryUntil(); $payload['retryUntil'] = $retryUntil instanceof DateTimeInterface From 8d47d97237eebf545d27eaa7ee8641ffb173d7a9 Mon Sep 17 00:00:00 2001 From: Christoph Beyer Date: Fri, 13 Aug 2021 23:07:32 +0200 Subject: [PATCH 2/3] Check for incomplete class to prevent unexpected error when class cannot be loaded (style) --- src/Illuminate/Queue/Console/RetryCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/Console/RetryCommand.php b/src/Illuminate/Queue/Console/RetryCommand.php index 23a5ae727a6a..c80bbaf665d8 100644 --- a/src/Illuminate/Queue/Console/RetryCommand.php +++ b/src/Illuminate/Queue/Console/RetryCommand.php @@ -171,7 +171,7 @@ protected function refreshRetryUntil($payload) throw new RuntimeException('Unable to extract job payload.'); } - if (is_object($instance) && !($instance instanceof \__PHP_Incomplete_Class) && method_exists($instance, 'retryUntil')) { + if (is_object($instance) && ! ($instance instanceof \__PHP_Incomplete_Class) && method_exists($instance, 'retryUntil')) { $retryUntil = $instance->retryUntil(); $payload['retryUntil'] = $retryUntil instanceof DateTimeInterface From 09c68c7f9299b43c7ebb558d4f9a70f0f78714da Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 14 Aug 2021 11:35:57 -0500 Subject: [PATCH 3/3] Update RetryCommand.php --- src/Illuminate/Queue/Console/RetryCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/Console/RetryCommand.php b/src/Illuminate/Queue/Console/RetryCommand.php index c80bbaf665d8..53993f8c6080 100644 --- a/src/Illuminate/Queue/Console/RetryCommand.php +++ b/src/Illuminate/Queue/Console/RetryCommand.php @@ -171,7 +171,7 @@ protected function refreshRetryUntil($payload) throw new RuntimeException('Unable to extract job payload.'); } - if (is_object($instance) && ! ($instance instanceof \__PHP_Incomplete_Class) && method_exists($instance, 'retryUntil')) { + if (is_object($instance) && ! $instance instanceof \__PHP_Incomplete_Class && method_exists($instance, 'retryUntil')) { $retryUntil = $instance->retryUntil(); $payload['retryUntil'] = $retryUntil instanceof DateTimeInterface