Bug #17892: Error Handling for eval()
| From: | Sky at quit-clan dot de | Date: | Fri, 21 Jun 2002 08:57:43 +0000 |
| Subject: | Bug #17892: Error Handling for eval() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-11649@lists.php.net to get a copy of this message | ||
From: Sky@quit-clan.de
Operating system: Any
PHP version: 4.2.1
PHP Bug Type: Feature/Change Request
Bug description: Error Handling for eval()
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 bug report at http://bugs.php.net/?id=17892&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17892&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17892&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17892&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17892&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17892&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17892&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17892&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17892&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17892&r=globals