Skip to content

Commit 972e4db

Browse files
[10.x] Do not use null to initialise $lastExecutionStartedAt (#46285)
* Initialise $lastExecutionStartedAt with Carbon::now() $lastExecutionStartedAt is passed to Carbon::equalTo(). Passing a null value to this method will result in deprecation message. * Update ScheduleWorkCommand.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent e70ecfc commit 972e4db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function handle()
3838
$this->getLaravel()->isLocal() ? OutputInterface::VERBOSITY_NORMAL : OutputInterface::VERBOSITY_VERBOSE
3939
);
4040

41-
[$lastExecutionStartedAt, $executions] = [null, []];
41+
[$lastExecutionStartedAt, $executions] = [Carbon::now()->subMinutes(10), []];
4242

4343
$command = implode(' ', array_map(fn ($arg) => ProcessUtils::escapeArgument($arg), [
4444
PHP_BINARY,

0 commit comments

Comments
 (0)