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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

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
 [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: Tue Mar 19 11:01:28 2024 UTC