ID: 45866
Updated by: [EMAIL PROTECTED]
Reported By: jsnell at e-normous dot com
-Status: Verified
+Status: Assigned
Bug Type: Date/time related
Operating System: Debian Linux with 2.6.22-2-amd64
PHP Version: 5.3CVS-2008-08-20 (snap)
-Assigned To:
+Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2008-08-20 03:58:45] jsnell at e-normous dot com
Description:
------------
Feeding a decimal value to DateTime's modify() function can cause very
long execution times because the decimal point is ignored.
Reproduced on the php5.3-200808200230 snapshot.
Reproduce code:
---------------
$date = new DateTime();
$date->modify("+1.61538461538 day");
Expected result:
----------------
A warning or exception, or perhaps 1 day + 0.61538461538*24 hours
added.
Actual result:
--------------
after 32 seconds of execution, 161538461538 days are added to the date
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45866&edit=1