ID:               48149
 Updated by:       der...@php.net
 Reported By:      lists at reptiliannature dot org
-Status:           Verified
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: *
 PHP Version:      5.3, 6CVS (2009-05-05)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Hah, I had fixed it in the parser, but not ran the regenerator to the
.c file. Should be fixed in CVS now.


Previous Comments:
------------------------------------------------------------------------

[2009-05-04 23:12:20] f...@php.net

Still present in 5.3.0RC2

------------------------------------------------------------------------

[2009-05-04 21:20:13] lists at reptiliannature dot org

Description:
------------
This bug seems to be identical to http://bugs.php.net/bug.php?id=45545
which was marked closed.

It appears than when part of the interval is greater than 9999 the
DateInterval throws an exception.

DateInterval::__construct(): Unknown or bad format (PT10000M);

This happens with years, days, hours, minutes, and seconds

Reproduce code:
---------------
$i = 900;
while ($i) {
        try {
                $di = new DateInterval('PT' . $i . 'M');
        }
        catch (exception $e) {
                var_dump($i);
                echo $e->getMessage();
                break;
        }
        $i++;
}

Expected result:
----------------
I would expect to have a DateInterval object with interval ('PT1000M')
or greater.

Actual result:
--------------
DateInterval::__construct(): Unknown or bad format (PT10000M);


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48149&edit=1

Reply via email to