Doc #63906 [NEW]: DateInterval::__construct throws undocumented Exception
| From: | matt dot patterson at bookit dot com | Date: | Fri, 04 Jan 2013 19:16:59 +0000 |
| Subject: | Doc #63906 [NEW]: DateInterval::__construct throws undocumented Exception | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-9352@lists.php.net to get a copy of this message | ||
From: matt dot patterson at bookit dot com
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:DateInterval::__construct throws undocumented Exception
Description:
------------
---
From manual page:
http://www.php.net/dateinterval.construct#refsect1-dateinterval.construct-parameters
---
DateInterval::__construct() throws \Exception when an invalid format is
supplied, but this exception is not documented anywhere in the PHP manual.
Test script:
---------------
<?php
try {
$di = new DateInterval('PTS'); // Or any other invalid format
} catch (Exception $e) {
echo $e->getMessage();
}
/*
* Prints:
* DateInterval::__construct() [<a
href='dateinterval.--construct'>dateinterval.--construct</a>]: Unknown or
bad format (PTS)
*/
--
Edit bug report at https://bugs.php.net/bug.php?id=63906&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63906&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63906&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63906&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63906&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63906&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63906&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63906&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63906&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63906&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63906&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=63906&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=63906&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63906&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63906&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63906&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63906&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63906&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63906&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63906&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63906&r=mysqlcfg