diff options
author | Andi Gutmans <andi@php.net> | 2004-03-01 13:29:45 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2004-03-01 13:29:45 +0000 |
commit | 7c72f6ff6161b2fd0421b5de240321e2ca032d13 (patch) | |
tree | 11b66a432ce0636b1b0e463bf6bc6a324758acbe /Zend/zend_exceptions.c | |
parent | 5e4b2874638d694ee6c58a878e26612bced898f1 (diff) | |
download | php-git-7c72f6ff6161b2fd0421b5de240321e2ca032d13.tar.gz |
- Fix crash in exception handling (zend_exception_error(...) and
zend_eval_string_ex() were buggy (Dmitry, Andi)
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r-- | Zend/zend_exceptions.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index dd1f2c08bb..6254810a5a 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -508,12 +508,12 @@ static void zend_error_va(int type, const char *file, uint lineno, const char *f va_end(args); } +/* This function doesn't return as it calls E_ERROR */ ZEND_API void zend_exception_error(zval *exception TSRMLS_DC) { zend_class_entry *ce_exception = Z_OBJCE_P(exception); if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) { zval *str, *file, *line; - zval *old_exception = EG(exception); EG(exception) = NULL; @@ -543,8 +543,6 @@ ZEND_API void zend_exception_error(zval *exception TSRMLS_DC) file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC); line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC); - EG(exception) = old_exception; - zend_error_va(E_ERROR, Z_STRVAL_P(file), Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str)); } else { zend_error(E_ERROR, "Uncaught exception '%s'", ce_exception->name); |