diff options
author | Stanislav Malyshev <stas@php.net> | 2017-07-04 21:10:08 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2017-07-04 21:10:08 -0700 |
commit | f269cdcd4f76accbecd03884f327cffb9a7f1ca9 (patch) | |
tree | 6196ba8ce7ec6d08dc50660853e354568fcb8529 | |
parent | e46d5896240012f5291fe3f730c76d5f0d124fe4 (diff) | |
download | php-git-f269cdcd4f76accbecd03884f327cffb9a7f1ca9.tar.gz |
Improve fix for #74145
-rw-r--r-- | ext/wddx/wddx.c | 15 |
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)); } |