r97789 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97788‎ | r97789 | r97790 >
Date:03:59, 22 September 2011
Author:aaron
Status:ok
Tags:
Comment:
Fixed accessing of $row var. Was giving:
Sep 22 03:50:53 10.0.8.45 apache2[14245]: PHP Fatal error: Cannot use object of type stdClass as array in /usr/local/apache/common-local/php-1.18/includes/api/ApiQuerySiteinfo.php on line 287
Modified paths:
  • /branches/wmf/1.18wmf1/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/api/ApiQuerySiteinfo.php
@@ -284,12 +284,12 @@
285285 if ( isset( $langNames[$row->iw_prefix] ) ) {
286286 $val['language'] = $langNames[$row->iw_prefix];
287287 }
288 - $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
289 - if( isset( $row['iw_wikiid'] ) ) {
290 - $val['wikiid'] = $row['iw_wikiid'];
 288+ $val['url'] = wfExpandUrl( $row->iw_url, PROTO_CURRENT );
 289+ if( isset( $row->iw_wikiid ) ) {
 290+ $val['wikiid'] = $row->iw_wikiid;
291291 }
292 - if( isset( $row['iw_api'] ) ) {
293 - $val['api'] = $row['iw_api'];
 292+ if( isset( $row->iw_api ) ) {
 293+ $val['api'] = $row->iw_api;
294294 }
295295
296296 $data[] = $val;

Follow-up revisions

RevisionCommit summaryAuthorDate
r97806Merge r97789 into trunk...reedy11:04, 22 September 2011
r104573The URL wasn't loading when the database is used (interwiki cache works). "PH...robin16:48, 29 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92528(bug 19838) API does not use interwiki cache....robin12:30, 19 July 2011

Status & tagging log