php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66486 strtotime on string with whitespace gives current timestamp not false
Submitted: 2014-01-15 00:24 UTC Modified: 2018-08-12 19:00 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: neufeind@php.net Assigned:
Status: Re-Opened Package: Date/time related
PHP Version: 5.5.8 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-01-15 00:24 UTC] neufeind@php.net
Description:
------------
correct: strtotime('') => bool(false)
however I did not expect: strtotime(' ') => current timestamp

I don't think this is by intention, is it?


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-15 00:26 UTC] neufeind@php.net
-Package: *General Issues +Package: Date/time related
 [2014-03-08 00:40 UTC] thiago at carvalho dot fm
Pull request

https://github.com/php/php-src/pull/615
 [2014-03-08 20:36 UTC] derick@php.net
hmm, don't see much of a problem with this ... I would not classify this as a bug that needs fixing.
 [2014-04-13 23:10 UTC] stas@php.net
-Assigned To: +Assigned To: derick
 [2017-10-24 08:10 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: derick +Assigned To:
 [2018-08-12 18:53 UTC] carusogabriel@php.net
Automatic comment on behalf of carusogabriel34@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c0a44c668ed0692c97e0b60d56b0a5e42cd67a3c
Log: Fix #66486: strtotime only with whitespaces should return false
 [2018-08-12 18:53 UTC] carusogabriel@php.net
-Status: Open +Status: Closed
 [2018-08-12 19:00 UTC] carusogabriel@php.net
-Status: Closed +Status: Re-Opened
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 19 20:01:37 2019 UTC