Bug #66362 [NEW]: ErrorException's code and severity are mixed up
| From: | benjamin dot morel at gmail dot com | Date: | Fri, 27 Dec 2013 21:06:16 +0000 |
| Subject: | Bug #66362 [NEW]: ErrorException's code and severity are mixed up | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-10744@lists.php.net to get a copy of this message | ||
From: benjamin dot morel at gmail dot com
Operating system: Irrelevant
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Bug
Bug description:ErrorException's code and severity are mixed up
Description:
------------
The example on the manual page for ErrorException passes the error
severity ($errno) to $code instead of $severity.
http://php.net/manual/en/class.errorexception.php
Expected result:
----------------
function exception_error_handler($errno, $errstr, $errfile, $errline )
{
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
Actual result:
--------------
function exception_error_handler($errno, $errstr, $errfile, $errline )
{
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
}
--
Edit bug report at https://bugs.php.net/bug.php?id=66362&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66362&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66362&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66362&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66362&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66362&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66362&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66362&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66362&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66362&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66362&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66362&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66362&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66362&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66362&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66362&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66362&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66362&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66362&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66362&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66362&r=mysqlcfg