]> granicus.if.org Git - php/commitdiff
Better fix for exceptions in __sleep()
authorDmitry Stogov <dmitry@php.net>
Mon, 12 Sep 2005 07:13:54 +0000 (07:13 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 12 Sep 2005 07:13:54 +0000 (07:13 +0000)
ext/standard/var.c

index e61e4db7ad0349c10a34a0b749957ad8a6140e36..78e444e9ea30ee6d59d126a01f9a78552f099015 100644 (file)
@@ -717,14 +717,7 @@ static void php_var_serialize_intern(smart_str *buf, zval **struc, HashTable *va
                                        res = call_user_function_ex(CG(function_table), struc, &fname, 
                                                                                                &retval_ptr, 0, 0, 1, NULL TSRMLS_CC);
 
-                                       if (res == SUCCESS) {
-                                               if (EG(exception)) {
-                                                       /* allow exceptions to bubble up */
-                                                       if (retval_ptr) {
-                                                               zval_ptr_dtor(&retval_ptr);
-                                                       }
-                                                       return;
-                                               }
+                                       if (res == SUCCESS && !EG(exception)) {
                                                if (retval_ptr) {
                                                        if (HASH_OF(retval_ptr)) {
                                                                php_var_serialize_class(buf, struc, retval_ptr,