-
-
Notifications
You must be signed in to change notification settings - Fork 163
Ignore the already safe date()
function
#665
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
Conversation
I put this back to draft to make a unique PR with all the fixes, in order to prevent conflicting PRs. |
date()
function
@cedric-anne thank you! Can you please split this PR for each function into a different PR? |
I can, but they will conflict each other, so I will wait for each one to be merged before opening the next one. First one is #666 . |
@cedric-anne ready when you are ;) |
date()
function
I rebased the current PR to include only the initial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job thanks!
released in v3.2.0 |
In PHP < 8.0, passing an invalid
timestamp
parameter value to thedate()
function was triggering a warning and afalse
value was returned.Since PHP 8.0, an error is thrown in this specific case.
Still, the corresponding PHP doc has only been fixed in PHP 8.4 and remained
Returns a formatted date string. If a non-numeric value is used for <parameter>timestamp</parameter>, &false; is returned and an <constant>E_WARNING</constant> level error is emitted.
in previous PHP 8.x version.