From: Robin Pepermans Date: Tue, 29 Nov 2011 16:48:37 +0000 (+0000) Subject: The URL wasn't loading when the database is used (interwiki cache works). "PHP Notice... X-Git-Tag: 1.31.0-rc.0~26230 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=7bf35ceb8de56efb8cff9932a6cd1d020039e84e;p=lhc%2Fweb%2Fwiklou.git The URL wasn't loading when the database is used (interwiki cache works). "PHP Notice: Trying to get property of non-object in /www/w/includes/api/ApiQuerySiteinfo.php on line 295" This reverts r97806. It took me some time to find out, but r96475 accidentally backported the change from $row->iw_url to $row['iw_url'] (etc) to 1.18, which was fixed in r97789. That revision was merged to trunk, which shouldn't have been done either. I.e. until 1.18 it is an object, from 1.19 it is an array. --- diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index c8a53faf95..e2580ac60b 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -292,12 +292,12 @@ class ApiQuerySiteinfo extends ApiQueryBase { if ( isset( $langNames[$prefix] ) ) { $val['language'] = $langNames[$prefix]; } - $val['url'] = wfExpandUrl( $row->iw_url, PROTO_CURRENT ); - if( isset( $row->iw_wikiid ) ) { - $val['wikiid'] = $row->iw_wikiid; + $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT ); + if( isset( $row['iw_wikiid'] ) ) { + $val['wikiid'] = $row['iw_wikiid']; } - if( isset( $row->iw_api ) ) { - $val['api'] = $row->iw_api; + if( isset( $row['iw_api'] ) ) { + $val['api'] = $row['iw_api']; } $data[] = $val;