]> granicus.if.org Git - php/commitdiff
- Fix crash with unhandled exceptions
authorAndi Gutmans <andi@php.net>
Sat, 8 Dec 2001 20:58:20 +0000 (20:58 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 8 Dec 2001 20:58:20 +0000 (20:58 +0000)
Zend/zend.c

index 1bfb53079cfc2eada97ec936a57fdcf62389b6a5..85eb43d03f35376bfa0447353c3caee6653bc811 100644 (file)
@@ -817,7 +817,9 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
                if (EG(active_op_array)) {
                        EG(return_value_ptr_ptr) = retval ? retval : &local_retval;
                        zend_execute(EG(active_op_array) TSRMLS_CC);
-                       if (!retval) {
+                       if (EG(exception)) {
+                               zval_ptr_dtor(&EG(exception));
+                       } else if (!retval) {
                                zval_ptr_dtor(EG(return_value_ptr_ptr));
                                local_retval = NULL;
                        }