]> granicus.if.org Git - php/commitdiff
Fixed bug #30799 (SoapServer doesn't handle private or protected properties)
authorDmitry Stogov <dmitry@php.net>
Tue, 16 Nov 2004 13:07:27 +0000 (13:07 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 16 Nov 2004 13:07:27 +0000 (13:07 +0000)
NEWS
ext/soap/php_encoding.c

diff --git a/NEWS b/NEWS
index 08f9fee9203e02315a4131f7b4d60f300fb1c999..ca6c9f2db1c6098f2f1b6bb953636942cc087625 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ PHP                                                                        NEWS
   or an object as first parameter. (Andrey) 
 - Fixed potential problems with unserializing invalid serialize data. (Marcus)
 - Fixed bug #29801 (Set limit on the size of mmapable data). (Ilia)
+- Fixed bug #30799 (SoapServer doesn't handle private or protected properties).
+  (Dmitry)
 - Fixed bug #30783 (Apache crash when using ReflectionFunction::
   getStaticVariables()). (Marcus)
 - Fixed bug #30750 (Meaningful error message when upload directory is not 
index 185d3e07fad421d2bc3e69fb3a7411a7c84513ef..43ddd65a2f646951d309521f1abd879d44c459cb 100644 (file)
@@ -1424,7 +1424,18 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                                property = master_to_xml(get_conversion((*zprop)->type), (*zprop), style, xmlParam);
 
                                if (key_type == HASH_KEY_IS_STRING) {
-                                       xmlNodeSetName(property, str_key);
+                               char *prop_name;
+
+                                       if (Z_TYPE_P(data) == IS_OBJECT) {
+                                         char *class_name;
+
+                                               zend_unmangle_property_name(str_key, &class_name, &prop_name);
+                                 } else {
+                                   prop_name = str_key;
+                                       }
+                                       if (prop_name) {
+                                               xmlNodeSetName(property, prop_name);
+                                       }
                                }
                                zend_hash_move_forward(prop);
                        }