]> granicus.if.org Git - php/commitdiff
Fixed handling of attributes' namespaces
authorDmitry Stogov <dmitry@php.net>
Mon, 28 Mar 2005 16:28:04 +0000 (16:28 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 28 Mar 2005 16:28:04 +0000 (16:28 +0000)
ext/soap/php_encoding.c

index eda32813e38cc0429f7174c6062506cf615a0722..cb17bebbc4e8dd67d316e67fb7e2ee1d66771707 100644 (file)
@@ -1480,7 +1480,7 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                                                                        soap_error3(E_ERROR, "Encoding: Attribute '%s' has fixed value '%s' (value '%s' is not allowed)", (*attr)->name, (*attr)->fixed, dummy->children->content);
                                                                }
                                                                if ((*attr)->namens &&
-                                                                   (type->ns == NULL || strcmp((*attr)->namens, type->ns))) {
+                                                                   (type->ns == NULL || strcmp((*attr)->namens, type->ns) == 0)) {
                                                                        xmlNsPtr nsp = encode_add_ns(xmlParam, (*attr)->namens);
 
                                                                        xmlSetNsProp(xmlParam, nsp, (*attr)->name, dummy->children->content);