Skip to content

Instantly share code, notes, and snippets.

@nikic

nikic/wddx.diff Secret

Created June 25, 2017 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikic/d629cba0738de96135428bced1a9476f to your computer and use it in GitHub Desktop.
Save nikic/d629cba0738de96135428bced1a9476f to your computer and use it in GitHub Desktop.
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 72d2408..f1215a2 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -814,7 +814,10 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
} else {
ent.type = ST_BOOLEAN;
SET_STACK_VARNAME;
- ZVAL_FALSE(&ent.data);
+
+ ALLOC_ZVAL(ent.data);
+ INIT_PZVAL(ent.data);
+ ZVAL_FALSE(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
}
} else if (!strcmp(name, EL_NULL)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment