summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2017-07-04 21:10:08 -0700
committerStanislav Malyshev <stas@php.net>2017-07-04 21:10:08 -0700
commitf269cdcd4f76accbecd03884f327cffb9a7f1ca9 (patch)
tree6196ba8ce7ec6d08dc50660853e354568fcb8529
parente46d5896240012f5291fe3f730c76d5f0d124fe4 (diff)
downloadphp-git-f269cdcd4f76accbecd03884f327cffb9a7f1ca9.tar.gz
Improve fix for #74145
-rw-r--r--ext/wddx/wddx.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 41fdd3d795..ee72ba2116 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -799,18 +799,23 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
} else if (!strcmp(name, EL_BOOLEAN)) {
int i;
- ALLOC_ZVAL(ent.data);
- INIT_PZVAL(ent.data);
- Z_TYPE_P(ent.data) = IS_BOOL;
- ent.type = ST_BOOLEAN;
- SET_STACK_VARNAME;
if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_VALUE) && atts[i+1] && atts[i+1][0]) {
+ ALLOC_ZVAL(ent.data);
+ INIT_PZVAL(ent.data);
+ Z_TYPE_P(ent.data) = IS_BOOL;
+ ent.type = ST_BOOLEAN;
+ SET_STACK_VARNAME;
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
php_wddx_process_data(user_data, atts[i+1], strlen(atts[i+1]));
break;
}
} else {
+ ALLOC_ZVAL(ent.data);
+ INIT_PZVAL(ent.data);
+ Z_TYPE_P(ent.data) = IS_BOOL;
+ ent.type = ST_BOOLEAN;
+ SET_STACK_VARNAME;
ZVAL_FALSE(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
}