#36510 [Fbk->Asn]: strtotime string with tabs - changed behaviour

From: Date: Fri, 24 Feb 2006 13:10:13 +0000
Subject: #36510 [Fbk->Asn]: strtotime string with tabs - changed behaviour
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93626@lists.php.net to get a copy of this message
 ID:               36510
 Updated by:       derick@php.net
 Reported By:      edoardo at serra dot to dot it
-Status:           Feedback
+Status:           Assigned
 Bug Type:         Date/time related
 Operating System: Linux
 PHP Version:      5.1.2
-Assigned To:      
+Assigned To:      derick
 New Comment:

Already on this. Tony, please try to confirm bugs first before asking
for feedback blindly.


Previous Comments:
------------------------------------------------------------------------

[2006-02-24 14:02:13] tony2001@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip



------------------------------------------------------------------------

[2006-02-24 11:31:46] 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)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36510&edit=1


Thread (6 messages)

« previous php.bugs (#93626) next »