]> granicus.if.org Git - php/commitdiff
- Bugfix #30266
authorMarcus Boerger <helly@php.net>
Fri, 11 Mar 2005 01:14:29 +0000 (01:14 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 11 Mar 2005 01:14:29 +0000 (01:14 +0000)
NEWS
ext/xml/xml.c

diff --git a/NEWS b/NEWS
index 1431398663192fc0a5733bcea095587614e5cb05..b8ac8ca2fce956b7cccf085c38506d334187f3bb 100644 (file)
--- 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)
index e2b8bb040e9496e7ff92f8d8608e15511542a1be..293d68eed3e9ad8907e52f0bac3357c4b4b93280 100644 (file)
@@ -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;
+       }
 }
 /* }}} */