]> granicus.if.org Git - php/commitdiff
fix bug #55285 XMLReader::getAttribute/No/Ns methods inconsistency
authorMichael Wallner <mike@php.net>
Thu, 3 Oct 2013 13:23:05 +0000 (15:23 +0200)
committerMichael Wallner <mike@php.net>
Thu, 3 Oct 2013 13:23:05 +0000 (15:23 +0200)
NEWS
UPGRADING
ext/xmlreader/php_xmlreader.c

diff --git a/NEWS b/NEWS
index 95acaa66692f76102d5e64cb10d6b6954e2d6f4a..e1a191f3ddbbd092720026af864ec30100c49fa4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -55,4 +55,8 @@ PHP                                                                        NEWS
   . Implemented FR #65634 (HTTP wrapper is very slow with protocol_version
     1.1). (Adam)
 
+- XMLReader:
+  . Fixed bug #55285 (XMLReader::getAttribute/No/Ns methods inconsistency). 
+    (Mike)
+
 <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
index 87b9eefeedb5242efeb54fafcdbba8d603851f4f..f4138875004f164804e2149629bb84ba92cf0876 100755 (executable)
--- a/UPGRADING
+++ b/UPGRADING
@@ -61,6 +61,10 @@ PHP X.Y UPGRADE NOTES
   CURLOPT_SAFE_UPLOAD is now turned on by default and uploads with @file 
   do not work unless it is explicitly set to false.
 
+- XMLReader:
+  XMLReader::getAttributeNs and XMLReader::getAttributeNo now return NULL if
+  the attribute could not be found, just like XMLReader::getAttribute.
+
 ========================================
 5. New Functions
 ========================================
index 464998ce62f20038bd36ce168dfbab92ac5b66d7..6ef25a235cd64412c99317fac4d11b4f02534e72 100644 (file)
@@ -588,9 +588,6 @@ PHP_METHOD(xmlreader, getAttributeNo)
        if (retchar) {
                RETVAL_STRING(retchar, 1);
                xmlFree(retchar);
-               return;
-       } else {
-               RETURN_EMPTY_STRING();
        }
 }
 /* }}} */
@@ -622,9 +619,6 @@ PHP_METHOD(xmlreader, getAttributeNs)
        if (retchar) {
                RETVAL_STRING(retchar, 1);
                xmlFree(retchar);
-               return;
-       } else {
-               RETURN_EMPTY_STRING();
        }
 }
 /* }}} */