summaryrefslogtreecommitdiff
path: root/ext/domxml
diff options
context:
space:
mode:
authorJoey Smith <joey@php.net>2001-07-08 00:54:25 +0000
committerJoey Smith <joey@php.net>2001-07-08 00:54:25 +0000
commitcd9fe169e140f5f2d4d895aff6224958956b8e08 (patch)
tree95935af7f7d0ecdc68b9d1d072e0d9de1434e52c /ext/domxml
parent88e45cfd3618b65d9a9e99f851d7d3e69f5e4907 (diff)
downloadphp-git-cd9fe169e140f5f2d4d895aff6224958956b8e08.tar.gz
This should get xmldocfile() working again.
This should fix bugs: 11192, 10899
Diffstat (limited to 'ext/domxml')
-rw-r--r--ext/domxml/php_domxml.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index 51d0caebaa..cc19e664f5 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);