]> granicus.if.org Git - php/commitdiff
Fixed bug #32455 (wrong setting property to unset value)
authorDmitry Stogov <dmitry@php.net>
Tue, 11 Oct 2005 10:15:40 +0000 (10:15 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 11 Oct 2005 10:15:40 +0000 (10:15 +0000)
NEWS
ext/soap/php_encoding.c

diff --git a/NEWS b/NEWS
index 16152a10129d5ecb675fa717355112a8e024025c..c1ad8bcd294b4645c2afccf055fa32e393d6a463 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -174,6 +174,7 @@ PHP                                                                        NEWS
   seg fault). (Dmitry)
 - Fixed bug #32937 (open_basedir looses trailing / in the limiter). (Adam Conrad)
 - Fixed bug #32589 (possible crash inside imap_mail_compose() function). (Ilia)
+- Fixed bug #32455 (wrong setting property to unset value). (Dmitry)
 - Fixed bug #32179 (xmlrpc_encode() segfaults with recursive references). (Tony)
 - Fixed bug #32139 (SOAP client does not auto-handle base64 encoding). (Ilia)
 - Fixed bug #32010 (Memory leak in mssql_fetch_batch). (fmk)
index 5905bc2d6abc0e0d96d2d97628686f3aff89fa40..c0494b8f98865ad445c1e69a02dbeb9c7088efe8 100644 (file)
@@ -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;