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: 2022-05-13 14:05 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: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.5.8 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: neufeind@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

Pull requests:

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
 [2022-05-13 14:05 UTC] derick@php.net
-Status: Re-Opened +Status: Closed -Assigned To: +Assigned To: derick
 [2022-05-13 14:05 UTC] derick@php.net
I'm closing this (and the duplicate), as I am confused about this. Please open a new ticket at https://github.com/php/php-src/issues if this is still a pressing issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC