Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/49795


Change subject: (bug 45130) Fix siprop=protocols in XML format
......................................................................

(bug 45130) Fix siprop=protocols in XML format

Change-Id: I2362be19f1e8f759e574d85ed210978c0fbd53a3
---
M includes/api/ApiQuerySiteinfo.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/49795/1

diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index 593d6e7..624711a 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -554,8 +554,10 @@
 
        public function appendProtocols( $property ) {
                global $wgUrlProtocols;
-               $this->getResult()->setIndexedTagName( $wgUrlProtocols, 'p' );
-               return $this->getResult()->addValue( 'query', $property, 
$wgUrlProtocols );
+               // Make a copy of the global so we don't try to set the 
_element key of it - bug 45130
+               $protocols = array_values( $wgUrlProtocols );
+               $this->getResult()->setIndexedTagName( $protocols, 'p' );
+               return $this->getResult()->addValue( 'query', $property, 
$protocols );
        }
 
        private function formatParserTags( $item ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/49795
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2362be19f1e8f759e574d85ed210978c0fbd53a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Alex Monk <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to