diff options
author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:48 -0400 |
---|---|---|
committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:48 -0400 |
commit | eddbbea4325e602ddc87c545531609132d4f0e3b (patch) | |
tree | f0994206a7e0a6251be7cc6729ba480f0c8729c2 /ext/soap/php_encoding.c | |
parent | 2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (diff) | |
download | php-eddbbea4325e602ddc87c545531609132d4f0e3b.tar.gz |
Imported Upstream version 5.2.3upstream/5.2.3
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r-- | ext/soap/php_encoding.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index b82bf7dbe..af7a8e1f1 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.103.2.21.2.32 2007/05/02 17:24:16 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.21.2.33 2007/05/04 06:19:34 dmitry Exp $ */ #include <time.h> @@ -1595,6 +1595,8 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval * property = xmlNewNode(NULL, BAD_CAST("BOGUS")); xmlAddChild(node, property); set_xsi_nil(property); + } else if (Z_TYPE_P(data) == IS_NULL && model->min_occurs == 0) { + return 1; } else { property = master_to_xml(enc, data, style, node); if (property->children && property->children->content && @@ -3356,8 +3358,12 @@ static int is_map(zval *array) int i, count = zend_hash_num_elements(Z_ARRVAL_P(array)); zend_hash_internal_pointer_reset(Z_ARRVAL_P(array)); - for (i = 0;i < count;i++) { - if (zend_hash_get_current_key_type(Z_ARRVAL_P(array)) == HASH_KEY_IS_STRING) { + for (i = 0; i < count; i++) { + char *str_index; + ulong num_index; + + if (zend_hash_get_current_key(Z_ARRVAL_P(array), &str_index, &num_index, 0) == HASH_KEY_IS_STRING || + num_index != i) { return TRUE; } zend_hash_move_forward(Z_ARRVAL_P(array)); |