-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
DateTime::createFromFormat() parameter incorrect #2238
Comments
\DateTime::createFromFormat expects a string in the second parameter, but if an integer is passed, internally converts that integer to a string and gives no error. |
The PHP 7 Manual expects a string and if it is not then has to test and convert for all possible parameter types. Once the passed type is found ( array, bool, float, integer, etc) then a nearest match conversion is used and hopefully is correct. The additional processing takes time and can be eliminated by passing the correct type or casting the passed parameter. Currently this is neither an error or a warning but could change in the near future or if an option arises to have a compiled version then this would surely be an error. |
Ok. You're right. |
DateTime::createFromFormat() expects string, integer given
file: system/HTTP/Response.php
The text was updated successfully, but these errors were encountered: