From: Dmitry Stogov Date: Thu, 15 Feb 2007 14:48:12 +0000 (+0000) Subject: Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice include minOc... X-Git-Tag: php-5.2.2RC1~394 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cf92f365a8a010d9bc1f7fb86a1ad8e49d7a7a0;p=php Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice include minOccurs=0) --- diff --git a/NEWS b/NEWS index 6dc370886c..b6dd3106e8 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PHP NEWS - Upgraded PCRE to version 7.0 (Nuno) - Add --ri switch to CLI which allows to check extension information. (Marcus) - Added tidyNode::getParent() method (John, Nuno) +- Fixed bug #40467 (Partial SOAP request sent when XSD sequence or choice + include minOccurs=0). (Dmitry) - Fixed bug #40455 (proc_open() uses wrong commandline when safe_mode_exec_dir is set). (Tony) - Fixed bug #40432 (strip_tags() fails with greater than in attribute). (Ilia) diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index aa2b98e887..154a570a35 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1574,8 +1574,10 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval * zend_hash_internal_pointer_reset_ex(model->u.content, &pos); while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) { - if (!model_to_xml_object(node, *tmp, object, style, model->min_occurs > 0 TSRMLS_CC)) { - return 0; + if (!model_to_xml_object(node, *tmp, object, style, (*tmp)->min_occurs > 0 TSRMLS_CC)) { + if ((*tmp)->min_occurs > 0) { + return 0; + } } zend_hash_move_forward_ex(model->u.content, &pos); }