Prevent "Notice: Undefined index" in ApiQuerySiteinfo
authorMarius Hoch <hoo@online.de>
Mon, 15 Sep 2014 02:33:16 +0000 (04:33 +0200)
committerMarius Hoch <hoo@online.de>
Mon, 15 Sep 2014 02:33:16 +0000 (04:33 +0200)
$row['iw_trans'] wont be set if $wgInterwikiCache is used.

Change-Id: Iea1041b9c699667c251442ed7f4c95e3ba550e7c

includes/api/ApiQuerySiteinfo.php

index 522c7c0..234360f 100644 (file)
@@ -399,7 +399,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        if ( isset( $row['iw_local'] ) && $row['iw_local'] == '1' ) {
                                $val['local'] = '';
                        }
-                       if ( $row['iw_trans'] == '1' ) {
+                       if ( isset( $row['iw_trans'] ) && $row['iw_trans'] == '1' ) {
                                $val['trans'] = '';
                        }