From 9cd7d691cbf6b05f9a263d250850f7e221389093 Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Thu, 21 Aug 2014 20:24:25 -0600 Subject: [PATCH] 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 --- includes/api/ApiQuerySiteinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 90683a96d7..f17ac29b81 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -393,7 +393,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { $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' ) { -- 2.20.1