dmitry          Mon Jan 26 11:09:36 2009 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/soap/tests/bugs        bug46419.phpt 

  Modified files:              
    /php-src/ext/soap   php_encoding.c 
  Log:
  Fixed bug #46419 (Elements of associative arrays with NULL value are lost)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.37.2.12&r2=1.103.2.21.2.37.2.13&diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.37.2.12 
php-src/ext/soap/php_encoding.c:1.103.2.21.2.37.2.13
--- php-src/ext/soap/php_encoding.c:1.103.2.21.2.37.2.12        Wed Dec 31 
11:15:43 2008
+++ php-src/ext/soap/php_encoding.c     Mon Jan 26 11:09:36 2009
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <dmi...@zend.com>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_encoding.c,v 1.103.2.21.2.37.2.12 2008/12/31 11:15:43 sebastian 
Exp $ */
+/* $Id: php_encoding.c,v 1.103.2.21.2.37.2.13 2009/01/26 11:09:36 dmitry Exp $ 
*/
 
 #include <time.h>
 
@@ -2775,33 +2775,31 @@
                        ulong int_val;
 
                        zend_hash_get_current_data(data->value.ht, (void 
**)&temp_data);
-                       if (Z_TYPE_PP(temp_data) != IS_NULL) {
-                               item = xmlNewNode(NULL, BAD_CAST("item"));
-                               xmlAddChild(xmlParam, item);
-                               key = xmlNewNode(NULL, BAD_CAST("key"));
-                               xmlAddChild(item,key);
-                               if (zend_hash_get_current_key(data->value.ht, 
&key_val, &int_val, FALSE) == HASH_KEY_IS_STRING) {
-                                       if (style == SOAP_ENCODED) {
-                                               set_xsi_type(key, "xsd:string");
-                                       }
-                                       xmlNodeSetContent(key, 
BAD_CAST(key_val));
-                               } else {
-                                       smart_str tmp = {0};
-                                       smart_str_append_long(&tmp, int_val);
-                                       smart_str_0(&tmp);
-
-                                       if (style == SOAP_ENCODED) {
-                                               set_xsi_type(key, "xsd:int");
-                                       }
-                                       xmlNodeSetContentLen(key, 
BAD_CAST(tmp.c), tmp.len);
-
-                                       smart_str_free(&tmp);
+                       item = xmlNewNode(NULL, BAD_CAST("item"));
+                       xmlAddChild(xmlParam, item);
+                       key = xmlNewNode(NULL, BAD_CAST("key"));
+                       xmlAddChild(item,key);
+                       if (zend_hash_get_current_key(data->value.ht, &key_val, 
&int_val, FALSE) == HASH_KEY_IS_STRING) {
+                               if (style == SOAP_ENCODED) {
+                                       set_xsi_type(key, "xsd:string");
                                }
+                               xmlNodeSetContent(key, BAD_CAST(key_val));
+                       } else {
+                               smart_str tmp = {0};
+                               smart_str_append_long(&tmp, int_val);
+                               smart_str_0(&tmp);
 
-                               xparam = 
master_to_xml(get_conversion((*temp_data)->type), (*temp_data), style, item);
+                               if (style == SOAP_ENCODED) {
+                                       set_xsi_type(key, "xsd:int");
+                               }
+                               xmlNodeSetContentLen(key, BAD_CAST(tmp.c), 
tmp.len);
 
-                               xmlNodeSetName(xparam, BAD_CAST("value"));
+                               smart_str_free(&tmp);
                        }
+
+                       xparam = 
master_to_xml(get_conversion((*temp_data)->type), (*temp_data), style, item);
+                       xmlNodeSetName(xparam, BAD_CAST("value"));
+
                        zend_hash_move_forward(data->value.ht);
                }
        }

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug46419.phpt?view=markup&rev=1.1
Index: php-src/ext/soap/tests/bugs/bug46419.phpt
+++ php-src/ext/soap/tests/bugs/bug46419.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to