Commit: 2659f5e88e9e76594aff0d0c27500514dfef2cb2 Author: Dmitry Stogov <dmi...@tpl2.home> Mon, 3 Sep 2012 11:52:42 +0400 Parents: 4cca6241e03f0abd442fd867f397b14b3be9d0bd Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2659f5e88e9e76594aff0d0c27500514dfef2cb2 Log: Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice) Bugs: https://bugs.php.net/50997 Changed paths: M ext/soap/php_encoding.c Diff: diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 84d603b..5addec4 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1818,11 +1818,12 @@ 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, (*tmp)->min_occurs > 0 TSRMLS_CC)) { - if ((*tmp)->min_occurs > 0) { + if (!model_to_xml_object(node, *tmp, object, style, strict && ((*tmp)->min_occurs > 0) TSRMLS_CC)) { + if (!strict || (*tmp)->min_occurs > 0) { return 0; } } + strict = 1; zend_hash_move_forward_ex(model->u.content, &pos); } return 1; @@ -1845,7 +1846,7 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval * return ret; } case XSD_CONTENT_GROUP: { - return model_to_xml_object(node, model->u.group->model, object, style, model->min_occurs > 0 TSRMLS_CC); + return model_to_xml_object(node, model->u.group->model, object, style, strict && model->min_occurs > 0 TSRMLS_CC); } default: break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php