From 3d99fc8020f5e5cb9d232fcc020ff6f465f6206d Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 29 Nov 2009 04:38:46 +0000 Subject: [PATCH] fix interrupt problem in serialize() --- ext/standard/var.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/var.c b/ext/standard/var.c index 12423c1c41..07c2e1e106 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -832,10 +832,10 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt zend_hash_get_current_data_ex(HASH_OF(retval_ptr), (void **) &name, &pos); if (Z_TYPE_PP(name) != IS_UNICODE) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return an array only containing the names of instance-variables to serialize"); /* we should still add element even if it's not OK, * since we already wrote the length of the array before */ smart_str_appendl(buf,"N;", 2); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return an array only containing the names of instance-variables to serialize"); continue; } if (zend_u_hash_find(Z_OBJPROP_P(struc), Z_TYPE_PP(name), Z_UNIVAL_PP(name), Z_UNILEN_PP(name) + 1, (void *) &d) == SUCCESS) { @@ -877,13 +877,13 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt break; } pefree(prot_name.v, ce->type & ZEND_INTERNAL_CLASS); - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "\"%R\" returned as member variable from __sleep() but does not exist", Z_TYPE_PP(name), Z_UNIVAL_PP(name)); if (Z_TYPE_PP(name) == IS_UNICODE) { php_var_serialize_unicode(buf, Z_USTRVAL_PP(name), Z_USTRLEN_PP(name)); } else { php_var_serialize_string(buf, Z_STRVAL_PP(name), Z_STRLEN_PP(name)); } php_var_serialize_intern(buf, nvalp, var_hash TSRMLS_CC); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "\"%R\" returned as member variable from __sleep() but does not exist", Z_TYPE_PP(name), Z_UNIVAL_PP(name)); } while (0); } else { if (Z_TYPE_PP(name) == IS_UNICODE) { -- 2.50.1