Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Do not use null to initialise $lastExecutionStartedAt #46285

Merged
merged 2 commits into from
Mar 1, 2023
Merged

[10.x] Do not use null to initialise $lastExecutionStartedAt #46285

merged 2 commits into from
Mar 1, 2023

Conversation

TimmayNL
Copy link
Contributor

$lastExecutionStartedAt is passed to Carbon::equalTo(), but passing a null value to this method will result in deprecation warning (E_USER_DEPRECATED):

Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values. in /data/www/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php on line 1115

Passing a null value will result in a Carbon::now() object being build and used for comparison, so it should be safe to initialize $lastExecutionStartedAt with it.

$lastExecutionStartedAt is passed to Carbon::equalTo(). Passing a null value to this method will result in deprecation message.
@TimmayNL TimmayNL marked this pull request as ready for review February 27, 2023 14:34
@taylorotwell taylorotwell merged commit 972e4db into laravel:10.x Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants