Bug #66362 [Asn->Csd]: ErrorException's code and severity are mixed up

From: Date: Sun, 29 Dec 2013 10:07:07 +0000
Subject: Bug #66362 [Asn->Csd]: ErrorException's code and severity are mixed up
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10752@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:         bjori@php.net
 Reported by:        benjamin dot morel at gmail dot com
 Summary:            ErrorException's code and severity are mixed up
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Documentation problem
 Operating System:   Irrelevant
 PHP Version:        Irrelevant
 Assigned To:        bjori
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Thanks for the headsup!

Looks like someone mistakenly "fixed" that example last year :(


Previous Comments:
------------------------------------------------------------------------
[2013-12-29 10:06:09] bjori@php.net

Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=332523
Log: Revert "r326694 | googleguy | 2012-07-18 17:38:06 -0700 (Wed, 18 Jul 2012) | 2 lines
Changed example for ErrorException, which demonstrated wrong argument order in the
construct."


This fixes bug#66362

------------------------------------------------------------------------
[2013-12-29 08:16:25] krakjoe@php.net

I'm not sure that they are actually mixed up, since we know who wrote the example assigning the
bug to them.

------------------------------------------------------------------------
[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


Thread (3 messages)

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