Bug #66362 [Opn]: ErrorException's code and severity are mixed up

From: Date: Sun, 29 Dec 2013 08:16:25 +0000
Subject: Bug #66362 [Opn]: ErrorException's code and severity are mixed up
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10750@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66362&edit=1 ID: 66362 Updated by: krakjoe@php.net Reported by: benjamin dot morel at gmail dot com Summary: ErrorException's code and severity are mixed up Status: Open Type: Bug Package: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant -Assigned To: +Assigned To: bjori Block user comment: N Private report: N New Comment: I'm not sure that they are actually mixed up, since we know who wrote the example assigning the bug to them. Previous Comments: ------------------------------------------------------------------------ [2013-12-27 21:06:16] benjamin dot morel at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=66362&edit=1

« previous php.doc.bugs (#10750) next »