PHP :: Bug #36510 :: strtotime string with tabs
| Bug #36510 | strtotime string with tabs - changed behaviour | ||||
|---|---|---|---|---|---|
| Submitted: | 2006-02-24 11:31 UTC | Modified: | 2006-02-27 20:41 UTC | ||
| From: | edoardo at serra dot to dot it | Assigned: | derick (profile) | ||
| Status: | Closed | Package: | Date/time related | ||
| PHP Version: | 5.1.2 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2006-02-24 11:31 UTC] edoardo at serra dot to dot it
Description:
------------
Strtotime returns false if a TAB is contained in the time string as in the following examples.
Not sure if it's a bug, but the behiavour has changed.
We had a mistiped line of code with a TAB in many projects, that's why we noticed it ;)
I suggest an internal replacement of \t, \r, \n as whitespaces
Reproduce code:
---------------
var_dump(strtotime("-2 hours"));
(with a TAB beetween '-2' and 'hours')
Expected result:
----------------
int(1140769426)
Actual result:
--------------
bool(false)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-02-24 14:10 UTC] derick@php.net
[2006-02-26 18:07 UTC] iliaa@php.net
[2006-02-27 20:41 UTC] derick@php.net