From e00b9ab746b7ba8b50df2fb009639da4ce740f6a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 11 Oct 2005 10:16:03 +0000 Subject: [PATCH] Fixed bug #32455 (wrong setting property to unset value) --- ext/soap/php_encoding.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index f12776291b..92c031f471 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -991,10 +991,18 @@ static zval* get_zval_property(zval* object, char* name TSRMLS_DC) old_scope = EG(scope); EG(scope) = Z_OBJCE_P(object); data = Z_OBJ_HT_P(object)->read_property(object, &member, BP_VAR_IS TSRMLS_CC); - EG(scope) = old_scope; if (data == EG(uninitialized_zval_ptr)) { + /* Hack for bug #32455 */ + zend_property_info *property_info; + + property_info = zend_get_property_info(Z_OBJCE_P(object), &member, 1 TSRMLS_CC); + EG(scope) = old_scope; + if (property_info && zend_hash_quick_exists(Z_OBJPROP_P(object), property_info->name, property_info->name_length+1, property_info->h)) { + return data; + } return NULL; } + EG(scope) = old_scope; return data; } else if (Z_TYPE_P(object) == IS_ARRAY) { zval **data_ptr; -- 2.50.1