You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there!
Thanks for the great library!
I think I've found a bug when integrating safe into my project.
Because of this: https://3v4l.org/HL9Xn strtotime('+1 day') is not equivalent to \Safe\strtotime('+1 day'), so looks to need some special handling, to not pass null as the 2nd param if the caller didn't specifically pass null, or enforce int for the 2nd param, or pass time() manually if null.
Thanks
The text was updated successfully, but these errors were encountered:
True! The default value for the second parameter in the PHP doc is "time()" (which of course is not a "valid" default value from a PHP standpoint). It gets replaced by null and that causes the issue.
Looking at the documentation, the touch function might also be impacted.
Hi there!
Thanks for the great library!
I think I've found a bug when integrating safe into my project.
Because of this:
https://3v4l.org/HL9Xn
strtotime('+1 day')
is not equivalent to\Safe\strtotime('+1 day')
, so looks to need some special handling, to not pass null as the 2nd param if the caller didn't specifically pass null, or enforce int for the 2nd param, or passtime()
manually if null.Thanks
The text was updated successfully, but these errors were encountered: