Commit:    c7b1d76eb9d09b0331272143e44e5024468b0fea
Author:    Michael Wallner <m...@php.net>         Thu, 3 Oct 2013 15:23:05 +0200
Parents:   2a1bd123d6397781082e00ccdfe2ff3ebd0d57fe
Branches:  master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=c7b1d76eb9d09b0331272143e44e5024468b0fea

Log:
fix bug #55285 XMLReader::getAttribute/No/Ns methods inconsistency

Bugs:
https://bugs.php.net/55285

Changed paths:
  M  NEWS
  M  UPGRADING
  M  ext/xmlreader/php_xmlreader.c


Diff:
diff --git a/NEWS b/NEWS
index 95acaa6..e1a191f 100644
--- 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! 
>>>
diff --git a/UPGRADING b/UPGRADING
index 87b9eef..f413887 100755
--- 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
 ========================================
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index 464998c..6ef25a2 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -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();
        }
 }
 /* }}} */


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to