]> granicus.if.org Git - php/commitdiff
- Value stored to var is never read
authorFelipe Pena <felipensp@gmail.com>
Sun, 19 Aug 2012 15:13:48 +0000 (12:13 -0300)
committerFelipe Pena <felipensp@gmail.com>
Sun, 19 Aug 2012 15:13:48 +0000 (12:13 -0300)
ext/dom/element.c

index 979274176b4d124369b2ff7f7df68cf94816f252..33002fa1eeaac9bcd0558fadd9ef5ac0c6e42c51 100644 (file)
@@ -832,7 +832,7 @@ PHP_FUNCTION(dom_element_set_attribute_ns)
                        }
 
                        if (errorcode == 0 && is_xmlns == 0) {
-                               attr = xmlSetNsProp(elemp, nsptr, (xmlChar *)localname, (xmlChar *)value);
+                               xmlSetNsProp(elemp, nsptr, (xmlChar *)localname, (xmlChar *)value);
                        }
                } else {
                        name_valid = xmlValidateName((xmlChar *) localname, 0);
@@ -844,7 +844,7 @@ PHP_FUNCTION(dom_element_set_attribute_ns)
                                if (attr != NULL && attr->type != XML_ATTRIBUTE_DECL) {
                                        node_list_unlink(attr->children TSRMLS_CC);
                                }
-                               attr = xmlSetProp(elemp, (xmlChar *)localname, (xmlChar *)value);
+                               xmlSetProp(elemp, (xmlChar *)localname, (xmlChar *)value);
                        }
                }
        }