#48149 [NEW]: Cannot make interval parts larger than 9999.
| From: | lists at reptiliannature dot org | Date: | Mon, 04 May 2009 21:20:14 +0000 |
| Subject: | #48149 [NEW]: Cannot make interval parts larger than 9999. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-136770@lists.php.net to get a copy of this message | ||
From: lists at reptiliannature dot org
Operating system: ALL
PHP version: 5.3.0RC1
PHP Bug Type: Date/time related
Bug description: Cannot make interval parts larger than 9999.
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 bug report at http://bugs.php.net/?id=48149&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48149&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48149&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48149&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48149&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48149&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48149&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48149&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48149&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48149&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48149&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48149&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48149&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48149&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48149&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48149&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48149&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48149&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48149&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48149&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48149&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48149&r=mysqlcfg