mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Rename variable to avoid confusion between error code and error severity
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336072 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
30eb8053bc
commit
adc09dadee
1 changed files with 3 additions and 3 deletions
|
@ -83,12 +83,12 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
|
||||
if (!(error_reporting() & $errno)) {
|
||||
function exception_error_handler($severity, $message, $file, $file ) {
|
||||
if (!(error_reporting() & $severity)) {
|
||||
// This error code is not included in error_reporting
|
||||
return;
|
||||
}
|
||||
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
|
||||
throw new ErrorException($message, 0, $severity, $file, $line);
|
||||
}
|
||||
set_error_handler("exception_error_handler");
|
||||
|
||||
|
|
Loading…
Reference in a new issue