dmitry Mon Jan 26 11:09:15 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/soap/tests/bugs bug46419.phpt
Modified files: /php-src NEWS /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/NEWS?r1=1.2027.2.547.2.1400&r2=1.2027.2.547.2.1401&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1400 php-src/NEWS:1.2027.2.547.2.1401 --- php-src/NEWS:1.2027.2.547.2.1400 Wed Jan 21 15:45:29 2009 +++ php-src/NEWS Mon Jan 26 11:09:11 2009 @@ -57,6 +57,8 @@ - Fixed bug #46701 (Creating associative array with long values in the key fails on 32bit linux). (Shire) - Fixed bug #46699 (xml_parse crash when parser is namespace aware). (Rob) +- Fixed bug #46419 (Elements of associative arrays with NULL value are lost). + (Dmitry) - Fixed bug #46282 (Corrupt DBF When Using DATE). (arne at bukkie dot nl) - Fixed bug #46005 (User not consistently logged under Apache2). (admorten at umich dot edu, Stas) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.45&r2=1.103.2.21.2.46&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.45 php-src/ext/soap/php_encoding.c:1.103.2.21.2.46 --- php-src/ext/soap/php_encoding.c:1.103.2.21.2.45 Wed Dec 31 11:17:43 2008 +++ php-src/ext/soap/php_encoding.c Mon Jan 26 11:09:13 2009 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmi...@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.103.2.21.2.45 2008/12/31 11:17:43 sebastian Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.21.2.46 2009/01/26 11:09:13 dmitry Exp $ */ #include <time.h> @@ -2662,33 +2662,32 @@ 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