php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51097 new DataTime crashs
Submitted: 2010-02-20 18:19 UTC Modified: 2010-02-20 21:28 UTC
From: phpbugs at rizzt dot kicks-ass dot org Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3.1 OS: linux
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: phpbugs at rizzt dot kicks-ass dot org
New email:
PHP Version: OS:

 

 [2010-02-20 18:19 UTC] phpbugs at rizzt dot kicks-ass dot org
Description:
------------
new DateTime('123') throws an exception

Reproduce code:
---------------
new DateTime('123');
echo "X";


Expected result:
----------------
X

Actual result:
--------------
Fatal error: Uncaught exception 'Exception' with message 
'DateTime::__construct(): Failed to parse time string (123) at position 
0 (1): Unexpected character' in /home/devel/x.php:5
Stack trace:
#0 /home/devel/x.php(5): DateTime->__construct('123')
#1 {main}
  thrown in /home/devel/x.php on line 5


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-20 21:28 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 01:01:28 2024 UTC