From b6d4004fd9456ae81a81a7b374c0b640f1d83a3f Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Tue, 12 Mar 2002 11:15:03 +0000 Subject: [PATCH] forgot SEPARATE_ZVAL, produced segfaults. segfaulted only in 4_2_0 (not in HEAD and 4_0_7, strange...) --- ext/domxml/php_domxml.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 960b39e23a..ee2e5f985c 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -2378,7 +2378,7 @@ PHP_FUNCTION(domxml_doc_get_element_by_id) xmlXPathObjectPtr xpathobjp; xmlNode *contextnodep; int name_len; - char *str,*name; + char *str, *name; contextnode = NULL; contextnodep = NULL; @@ -2423,9 +2423,10 @@ PHP_FUNCTION(domxml_doc_get_element_by_id) xmlNodePtr node = nodesetp->nodeTab[0]; int retnode; rv = php_domobject_new(node, &retnode TSRMLS_CC); + SEPARATE_ZVAL(&rv); } else { - /*return false array, if no nodes were found */ + /*return false, if no nodes were found */ RETURN_FALSE; } -- 2.50.1