]> granicus.if.org Git - php/commitdiff
Don't hammer the resource type right off the bat.
authorJoey Smith <joey@php.net>
Tue, 14 Aug 2001 07:36:18 +0000 (07:36 +0000)
committerJoey Smith <joey@php.net>
Tue, 14 Aug 2001 07:36:18 +0000 (07:36 +0000)
ext/domxml/php_domxml.c

index ce94e7c769af1667f6be66a04b64ebcb33393f92..1bf6708e6ceb4518618e3a6f67027f0699575cca 100644 (file)
@@ -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);