From: Dmitry Stogov Date: Mon, 12 Sep 2005 07:13:54 +0000 (+0000) Subject: Better fix for exceptions in __sleep() X-Git-Tag: php-5.1.0RC2~272 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56824385499a544a2c06cf770bd0a821c780620a;p=php Better fix for exceptions in __sleep() --- diff --git a/ext/standard/var.c b/ext/standard/var.c index e61e4db7ad..78e444e9ea 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -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,