From: Bryan Davis Date: Fri, 22 Aug 2014 02:24:25 +0000 (-0600) Subject: Check for existence of iw_local in Interwiki::getAllPrefixes X-Git-Tag: 1.31.0-rc.0~14329 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=9cd7d691cbf6b05f9a263d250850f7e221389093;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ) {