Skip to content

Commit

Permalink
[8.x] Check for incomplete class to prevent unexpected error when cla…
Browse files Browse the repository at this point in the history
…ss cannot be loaded (#38379)

* Check for incomplete class to prevent unexpected error when class cannot be loaded

* Check for incomplete class to prevent unexpected error when class cannot be loaded (style)

* Update RetryCommand.php

Co-authored-by: Christoph Beyer <the-real-christoph>
Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
the-real-christoph and taylorotwell authored Aug 14, 2021
1 parent 3591526 commit a668e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Queue/Console/RetryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a668e6a

Please sign in to comment.