]> granicus.if.org Git - php/commitdiff
- Fix crash
authorAndi Gutmans <andi@php.net>
Sun, 24 Nov 2002 20:15:56 +0000 (20:15 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 24 Nov 2002 20:15:56 +0000 (20:15 +0000)
Zend/zend.c

index 80c1b824a49bf3ca50abf3c81866292b3cb0463b..17d2cda0c578fd8963fc03d78f1bf4d9f38ba09c 100644 (file)
@@ -813,7 +813,9 @@ ZEND_API void zend_error(int type, const char *format, ...)
                        orig_user_error_handler = EG(user_error_handler);
                        EG(user_error_handler) = NULL;
                        if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC)==SUCCESS) {
-                               zval_ptr_dtor(&retval);
+                               if (retval) {
+                                       zval_ptr_dtor(&retval);
+                               }
                        } else {
                                /* The user error handler failed, use built-in error handler */
                                zend_error_cb(type, error_filename, error_lineno, format, args);