php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66362 ErrorException's code and severity are mixed up
Submitted: 2013-12-27 21:06 UTC Modified: 2013-12-29 10:07 UTC
From: benjamin dot morel at gmail dot com Assigned: bjori (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: benjamin dot morel at gmail dot com
New email:
PHP Version: OS:

 

 [2013-12-27 21:06 UTC] 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);
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-29 08:16 UTC] krakjoe@php.net
-Assigned To: +Assigned To: bjori
 [2013-12-29 08:16 UTC] 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-29 10:06 UTC] 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 10:07 UTC] bjori@php.net
-Status: Assigned +Status: Closed
 [2013-12-29 10:07 UTC] bjori@php.net
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 :(
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 16:01:31 2024 UTC