ID:               13993
 Comment by:       brad at info-link dot net
 Reported By:      sbarnum at pointsystems dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Redhat Linux 7.1
 PHP Version:      4.0.6
 New Comment:

Any chance this might be changed?  I'd like to catch the "call to
undefined function" error without the script dying...  Unless there is
some other way to verify that a bit of php code is syntactically valid
during script execution?  The tokenizer exension doesn't seem to care
about how the tokens are ordered...


Previous Comments:
------------------------------------------------------------------------

[2002-06-12 16:58:30] jukkaho at mail dot student dot oulu dot fi

I share your problem and I think I have solved it (for 4.2.1 tree).

My bad english explanation with a patch can be found at
http://bugs.php.net/bug.php?id=17731

Try it out and report any problems it can cause. Maybe we can get the
fix in.

------------------------------------------------------------------------

[2002-04-10 21:11:33] ben at qubed dot co dot nz

I have the same problem - would be a very nice feature to be able to
catch errors in eval statements.

------------------------------------------------------------------------

[2001-11-10 15:00:10] [EMAIL PROTECTED]

Reopening as a feature-request.

------------------------------------------------------------------------

[2001-11-10 12:24:47] [EMAIL PROTECTED]

Parse errors are never handled by set_error_handler().

------------------------------------------------------------------------

[2001-11-08 15:30:54] sbarnum at pointsystems dot com

I'm trying to validate some dynamically generated PHP code using
eval()
set_error_handler('eval_error');
eval($php_code);
restore_error_handler();

problem:  if $php_code contains a parse error, the error is not
reported using the eval_error() function, but uses the generic error
handler.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=13993&edit=1

Reply via email to