diff options
author | Joey Smith <joey@php.net> | 2001-08-14 07:36:18 +0000 |
---|---|---|
committer | Joey Smith <joey@php.net> | 2001-08-14 07:36:18 +0000 |
commit | 109f4145577a88b155d9e25e9afe3fea2b4bf573 (patch) | |
tree | 6d084b551f00e13e0de5506cdd6011c77bc46ddd /ext/domxml/php_domxml.c | |
parent | e3d6fc72e53172e3117eed55784e48a78712b8c0 (diff) | |
download | php-git-109f4145577a88b155d9e25e9afe3fea2b4bf573.tar.gz |
Don't hammer the resource type right off the bat.
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r-- | ext/domxml/php_domxml.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index ce94e7c769..1bf6708e6c 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -489,7 +489,10 @@ static zval *php_xpathobject_new(xmlXPathObjectPtr obj, int *found TSRMLS_DC) { zval *wrapper; - *found = 0; + if (! found) { + *found = 0; + } + if (!obj) { MAKE_STD_ZVAL(wrapper); ZVAL_NULL(wrapper); @@ -585,7 +588,10 @@ static zval *php_xpathcontext_new(xmlXPathContextPtr obj, int *found TSRMLS_DC) zval *wrapper; int rsrc_type; - *found = 0; + if (! found) { + *found = 0; + } + if (!obj) { MAKE_STD_ZVAL(wrapper); ZVAL_NULL(wrapper); @@ -660,7 +666,10 @@ static zval *php_domobject_new(xmlNodePtr obj, int *found TSRMLS_DC) char *content; int rsrc_type; - *found = 0; + if (! found) { + *found = 0; + } + if (!obj) { MAKE_STD_ZVAL(wrapper); ZVAL_NULL(wrapper); |