ID: 15154
Comment by: ralph at netzbeben dot de
Reported By: J dot Kolakowski at students dot mimuw dot edu dot pl
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: PLD Linux 2.4.16
PHP Version: 4.0CVS-2002-01-21
New Comment:
oh well:
from the php docs: 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-09-14 11:37:33] ralph at netzbeben dot de
an error which is hard to explain :)
i have the same problem.
maybe php can't run the custom error_handling function if a parse
errors happens ?
for all those who think your error_handler doesn't throw that error:
just remove a ";" of a line of your source code... and... watch..
anyone any ideas ?
------------------------------------------------------------------------
[2002-01-22 15:59:13] J dot Kolakowski at students dot mimuw dot edu
dot pl
And suppose i have the following main.php file:
<?php
function my_handler(...)
{ /* ... */ }
error_reporting(E_ALL);
set_error_handler('my_handler');
include('file_with_errors.php');
?>
and the file_with_errors.php contains some parse errors. Am I right,
that there is no way to handle errors from file_with_errors.php?
------------------------------------------------------------------------
[2002-01-22 15:47:53] J dot Kolakowski at students dot mimuw dot edu
dot pl
Sorry, my mistake. It prints "Warning: Use of undefined constant ..."
indeed. And does it mean we just cannot handle any parse errors?
------------------------------------------------------------------------
[2002-01-22 15:33:16] [EMAIL PROTECTED]
It's unclear to me how you can reproduce a parser error:
$ ~/php/4.1.1/bin/php -q
<?
error_reporting(E_ALL);
i_am_some_parse_error
?>
<br>
<b>Warning</b>: Use of undefined constant i_am_some_parse_error -
assumed 'i_am_some_parse_error' in <b>-</b> on line <b>4</b><br>
I tested both 4.1.1 and CVS cgi. Where you using the CLI version?
------------------------------------------------------------------------
[2002-01-22 13:54:19] J dot Kolakowski at students dot mimuw dot edu
dot pl
If the first one is not an parse error, why do I see "Parse error:
parse error in ... on line ..." when I run the code without calling
set_error_handler()? Are there any parse errors that are caught by an
error handler?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15154
--
Edit this bug report at http://bugs.php.net/?id=15154&edit=1