From cd9fe169e140f5f2d4d895aff6224958956b8e08 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Sun, 8 Jul 2001 00:54:25 +0000 Subject: [PATCH] This should get xmldocfile() working again. This should fix bugs: 11192, 10899 --- ext/domxml/php_domxml.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 51d0caebaae..cc19e664f51 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -2123,7 +2123,7 @@ PHP_FUNCTION(xmldoc) Creates DOM object of XML document in file*/ PHP_FUNCTION(xmldocfile) { - zval *arg; + zval *arg, *rv; xmlDoc *docp; int ret; @@ -2138,8 +2138,11 @@ PHP_FUNCTION(xmldocfile) } ret = zend_list_insert(docp, le_domxmldocp); - /* construct an object with some methods */ - object_init_ex(return_value, domxmldoc_class_entry); + rv = php_domobject_new((xmlNodePtr) docp, &ret); + SEPARATE_ZVAL(&rv); + *return_value = *rv; + FREE_ZVAL(rv); + add_property_resource(return_value, "doc", ret); if(docp->name) add_property_stringl(return_value, "name", (char *) docp->name, strlen(docp->name), 1);