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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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 May 05 07:01:32 2024 UTC