summaryrefslogtreecommitdiff
path: root/ext/soap/php_encoding.c
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-10-04 08:39:34 +0100
committerDerick Rethans <github@derickrethans.nl>2012-10-04 08:39:34 +0100
commitb004a04f0aaf041e5fabaf788eee3e9ee0f3afaf (patch)
treef3b3dd22329eb6f2b258145a92722becb9ee6b8d /ext/soap/php_encoding.c
parent78354f30d99ebc7f1035c567b9b00e967d87ecc8 (diff)
parent64c09f68ec66061d1085ad5a5ef0a5ced63450b6 (diff)
downloadphp-git-b004a04f0aaf041e5fabaf788eee3e9ee0f3afaf.tar.gz
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r--ext/soap/php_encoding.c7
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;