]> granicus.if.org Git - php/commitdiff
Reverting patch at Derick's request. Reverted to 1.118
authorJoseph Tate <jtate@php.net>
Thu, 7 Mar 2002 18:47:25 +0000 (18:47 +0000)
committerJoseph Tate <jtate@php.net>
Thu, 7 Mar 2002 18:47:25 +0000 (18:47 +0000)
ext/domxml/php_domxml.c

index b138bec17307d50ab558b09baf24ad6d50d4cf57..9246ab702afd53e4ff1d685fffb6fb53ef65963e 100644 (file)
@@ -1010,7 +1010,6 @@ static zval *php_domobject_new(xmlNodePtr obj, int *found TSRMLS_DC)
                        object_init_ex(wrapper, domxmlattr_class_entry);
                        rsrc_type = le_domxmlattrp;
                        add_property_stringl(wrapper, "name", (char *) attrp->name, strlen(attrp->name), 1);
-                       add_property_long(wrapper, "type", Z_TYPE_P(attrp));
                        content = xmlNodeGetContent((xmlNodePtr) attrp);
                        if (content)
                                add_property_stringl(wrapper, "value", (char *) content, strlen(content), 1);
@@ -1050,7 +1049,6 @@ static zval *php_domobject_new(xmlNodePtr obj, int *found TSRMLS_DC)
                        xmlDtdPtr dtd = (xmlDtdPtr) obj;
                        object_init_ex(wrapper, domxmldtd_class_entry);
                        rsrc_type = le_domxmldtdp;
-                       add_property_long(wrapper, "type", Z_TYPE_P(dtd));
                        if (dtd->ExternalID)
                                add_property_string(wrapper, "publicId", (char *) dtd->ExternalID, 1);
                        if (dtd->SystemID)
@@ -1066,9 +1064,10 @@ static zval *php_domobject_new(xmlNodePtr obj, int *found TSRMLS_DC)
                        object_init_ex(wrapper, domxmlcdata_class_entry);
                        rsrc_type = le_domxmlcdatap;
                        content = xmlNodeGetContent(nodep);
-                       add_property_long(wrapper, "type", Z_TYPE_P(nodep));
-                       if (content)
+                       if (content) {
+                               add_property_long(wrapper, "type", Z_TYPE_P(nodep));
                                add_property_stringl(wrapper, "content", (char *) content, strlen(content), 1);
+                       }
                        break;
                }