diff options
Diffstat (limited to 'ext/wddx/wddx.c')
-rw-r--r-- | ext/wddx/wddx.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 72d2408c1f..41fdd3d795 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -799,22 +799,19 @@ 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]) { - ent.type = ST_BOOLEAN; - SET_STACK_VARNAME; - - ALLOC_ZVAL(ent.data); - INIT_PZVAL(ent.data); - Z_TYPE_P(ent.data) = IS_BOOL; 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 { - ent.type = ST_BOOLEAN; - SET_STACK_VARNAME; - ZVAL_FALSE(&ent.data); + ZVAL_FALSE(ent.data); wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); } } else if (!strcmp(name, EL_NULL)) { |