Skip to content

Commit a668e6a

Browse files
[8.x] Check for incomplete class to prevent unexpected error when class 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]>
1 parent 3591526 commit a668e6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Queue/Console/RetryCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ protected function refreshRetryUntil($payload)
171171
throw new RuntimeException('Unable to extract job payload.');
172172
}
173173

174-
if (is_object($instance) && method_exists($instance, 'retryUntil')) {
174+
if (is_object($instance) && ! $instance instanceof \__PHP_Incomplete_Class && method_exists($instance, 'retryUntil')) {
175175
$retryUntil = $instance->retryUntil();
176176

177177
$payload['retryUntil'] = $retryUntil instanceof DateTimeInterface

0 commit comments

Comments
 (0)