Bug #17892 Updated: Error Handling for eval()
| From: | Sky at quit-clan dot de | Date: | Fri, 21 Jun 2002 14:45:56 +0000 |
| Subject: | Bug #17892 Updated: Error Handling for eval() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11679@lists.php.net to get a copy of this message | ||
ID: 17892
Updated by: Sky@quit-clan.de
Reported By: Sky@quit-clan.de
Status: Open
Bug Type: Feature/Change Request
Operating System: Any
PHP Version: 4.2.1
New Comment:
Sorry, of course a parse error is not a fatal error, what i meant was:
fatal errors like "call to undefined function".
Previous Comments:
------------------------------------------------------------------------
[2002-06-21 04:57:42] Sky@quit-clan.de
I want to handle Parse_Errors and similar Fatals with my custom error
handler when they occur in eval()'d code.
This is necessary when i want to execute custom code in my console
script and prevent this code from crashing my entire program if there
is only a simple typo in there...
I have achieved this by a little hack in the "zend_execute.c" but i
don't know if this handles any errors right that don't occur in
eval'd() code...
This is what i changed (to even prevent a segmentation fault)
(zend_execute.c, line 1563):
if (zend_hash_find(active_function_table, function_name->value.str.val,
function_name->value.str.len+1, (void **) &function)==FAILURE) {
zend_error(E_USER_ERROR, "Call to undefined function: %s()",
function_name->value.str.val);
return;
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17892&edit=1