From 3d7b5b792ea3ca8d2bf1ba868fff21259851530b Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 11 Mar 2005 01:14:29 +0000 Subject: [PATCH] - Bugfix #30266 --- NEWS | 1 + ext/xml/xml.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 1431398663..b8ac8ca2fc 100644 --- a/NEWS +++ b/NEWS @@ -132,6 +132,7 @@ PHP NEWS - Fixed bug #30446 (apache2handler: virtual() includes files out of sequence) - Fixed bug #30430 (odbc_next_result() doesn't bind values and that results in segfault). (pdan-php at esync dot org, Tony) +- Fixed bug #30266 (Invalid opcode 137/1/8). (Marcus) - Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many parameters). (Jani) - Fixed bug #29989 (type re_registers redefined in oniguruma.h). (Moriyoshi) diff --git a/ext/xml/xml.c b/ext/xml/xml.c index e2b8bb040e..293d68eed3 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -388,12 +388,12 @@ static void xml_set_handler(zval **handler, zval **data) /* {{{ xml_call_handler() */ static zval *xml_call_handler(xml_parser *parser, zval *handler, zend_function *function_ptr, int argc, zval **argv) { + int i; TSRMLS_FETCH(); - if (parser && handler) { + if (parser && handler && !EG(exception)) { zval ***args; zval *retval; - int i; int result; zend_fcall_info fci; @@ -437,10 +437,14 @@ static zval *xml_call_handler(xml_parser *parser, zval *handler, zend_function * if (result == FAILURE) { return NULL; } else { - return retval; + return EG(exception) ? NULL : retval; } + } else { + for (i = 0; i < argc; i++) { + zval_ptr_dtor(&argv[i]); } return NULL; + } } /* }}} */ -- 2.50.1