r104573 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104572‎ | r104573 | r104574 >
Date:16:48, 29 November 2011
Author:robin
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -292,12 +292,12 @@
293293 if ( isset( $langNames[$prefix] ) ) {
294294 $val['language'] = $langNames[$prefix];
295295 }
296 - $val['url'] = wfExpandUrl( $row->iw_url, PROTO_CURRENT );
297 - if( isset( $row->iw_wikiid ) ) {
298 - $val['wikiid'] = $row->iw_wikiid;
 296+ $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
 297+ if( isset( $row['iw_wikiid'] ) ) {
 298+ $val['wikiid'] = $row['iw_wikiid'];
299299 }
300 - if( isset( $row->iw_api ) ) {
301 - $val['api'] = $row->iw_api;
 300+ if( isset( $row['iw_api'] ) ) {
 301+ $val['api'] = $row['iw_api'];
302302 }
303303
304304 $data[] = $val;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r964751.18: MFT r94737, r94990, r95000, r95001, r95002, r95006, r95007, r95010, r95...catrope19:37, 7 September 2011
r97789Fixed accessing of $row var. Was giving:...aaron03:59, 22 September 2011
r97806Merge r97789 into trunk...reedy11:04, 22 September 2011

Status & tagging log