From: Michael Wallner Date: Thu, 3 Oct 2013 13:23:05 +0000 (+0200) Subject: fix bug #55285 XMLReader::getAttribute/No/Ns methods inconsistency X-Git-Tag: php-5.6.0alpha1~211^2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7b1d76eb9d09b0331272143e44e5024468b0fea;p=php fix bug #55285 XMLReader::getAttribute/No/Ns methods inconsistency --- diff --git a/NEWS b/NEWS index 95acaa6669..e1a191f3dd 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 87b9eefeed..f413887500 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 464998ce62..6ef25a235c 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(); } } /* }}} */