BryanDavis has uploaded a new change for review.

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

Change subject: Check for existence of iw_local in Interwiki::getAllPrefixes
......................................................................

Check for existence of iw_local in Interwiki::getAllPrefixes

Interwiki::getAllPrefixes only sets the iw_local member in a response
row if $local is set to a non-null value. Under certain error
reporting conditions, the unqualified access to the array key leads to
warnings such as "message repeated 1471 times: [ #012Notice: Undefined
index: iw_trans in ...".

Change-Id: Ibf434dc9c362984cad76ae6bdb29de826974d81e
---
M includes/api/ApiQuerySiteinfo.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/155686/1

diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index 90683a9..f17ac29 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -393,7 +393,7 @@
                        $prefix = $row['iw_prefix'];
                        $val = array();
                        $val['prefix'] = $prefix;
-                       if ( $row['iw_local'] == '1' ) {
+                       if ( isset( $row['iw_local'] ) && $row['iw_local'] == 
'1' ) {
                                $val['local'] = '';
                        }
                        if ( $row['iw_trans'] == '1' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf434dc9c362984cad76ae6bdb29de826974d81e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>

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

Reply via email to