Bug #72425 [Com]: strtotime() doesn't return false when string contains white space

From: Date: Wed, 15 Jun 2016 20:44:36 +0000
Subject: Bug #72425 [Com]: strtotime() doesn't return false when string contains white space
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201666@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72425&edit=1

 ID:                 72425
 Comment by:         alex at itc77 dot com
 Reported by:        alex at itc77 dot com
 Summary:            strtotime() doesn't return false when string
                     contains white space
 Status:             Open
 Type:               Bug
 Package:            Date/time related
 PHP Version:        7.0.7
 Block user comment: N
 Private report:     N

 New Comment:

Please accept this patch:

https://github.com/php/php-src/pull/615


Previous Comments:
------------------------------------------------------------------------
[2016-06-15 20:42:44] alex at itc77 dot com

Description:
------------
strtotime() doesn't return false when string contains white space

According to the documentation white space should be treated as invalid format and  return false.

Test script:
---------------
strtotime(" ")



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



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


Thread (8 messages)

« previous php.bugs (#201666) next »