diff options
author | Andrey Hristov <andrey@php.net> | 2012-10-17 17:23:37 +0200 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2012-10-17 17:23:37 +0200 |
commit | 7314ed535f93841ff2d2bca5e65afcb0f2b003bb (patch) | |
tree | bceec620f2cb1d5f255196e00ae7ea1187b41fe2 /ext/soap/php_encoding.c | |
parent | c50d732f7686352381d44926988aca194204433d (diff) | |
parent | da541ff561e0ac6ac72d2efd8b785ecfeef868dc (diff) | |
download | php-git-7314ed535f93841ff2d2bca5e65afcb0f2b003bb.tar.gz |
Merge branch 'PHP-5.3' of ssh://git.php.net/php-src into PHP-5.3
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r-- | ext/soap/php_encoding.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 97a79a349e..ee28d99dc0 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1834,11 +1834,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; @@ -1861,7 +1862,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; |