Ask a Question related to PHP Development, Design and Development.
-
sniper@php.net #1
#25842 [Opn->Bgs]: Error Reporting not catching parse errors
ID: 25842
Updated by: [email]sniper@php.net[/email]
Reported By: corrupted_wise at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: Win XP SP1
PHP Version: 4.3.4RC1
New Comment:
RTFM: [url]http://www.php.net/set_error_handler[/url]
"Note: The following error types cannot be handled with a user defined
function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING,
E_COMPILE_ERROR and E_COMPILE_WARNING."
Previous Comments:
------------------------------------------------------------------------
[2003-10-11 23:08:21] corrupted_wise at yahoo dot com
Description:
------------
When attempting to catch an error with a set_error_handler function, it
always misses a parse error. For example, when loading a php file, no
matter if require, include, require_once..etc. is used, the default php
bold errors are displayed when the function is ignored. Notice errors
load fine, tho.
I have not made any changes to php.ini-dist, and no modules.
I'm running this on Apache 2.0.47.
Reproduce code:
---------------
<?php
function error_handler($errno, $errstr, $errfile, $errline, $errctx) {
echo "\nerror_handler:\n\terrno=$errno\n\terrstr=$errst r\n";
echo "\terrfile=$errfile\n\terrline=$errline\n";
die();
}
set_error_handler("error_handler");
error_reporting(E_ALL);
// load file with parse error
include "error.php";
exit;
?>
Expected result:
----------------
error_handler:
errno=4
errstr=Parse error: parse error, unexpected ',', expecting ']' in
error.php on line 65
errfile=error.php
errline=1
Actual result:
--------------
<b>Parse error: parse error, unexpected ',', expecting ']' in error.php
on line 65</b>
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=25842&edit=1[/url]
sniper@php.net Guest
-
cferror not catching errors
I can't let you get away with that. There is definitely a problem with <cferror> in CF MX as I see it. I have the same or similar problem that was... -
Catching DateValidator errors
I am trhying to use a DateValidator in ActionScript to validate fields before going to a new screen. I need to catch any errors from the validator... -
Cferror not catching CFML construct errors
Hey all, I have set up custom error pages on a site using cferror to catch all errors. This is working fine for all errors except for those... -
#25842 [NEW]: Error Reporting not catching parse errors
From: corrupted_wise at yahoo dot com Operating system: Win XP SP1 PHP version: 4.3.4RC1 PHP Bug Type: Output Control Bug... -
#25482 [Opn->Bgs]: CLI isn't reporting parse errors correctly
ID: 25482 Updated by: sniper@php.net Reported By: tim dot lokot at printsoft dot com -Status: Open +Status: ...



Reply With Quote

