r103460 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103459‎ | r103460 | r103461 >
Date:14:02, 17 November 2011
Author:mah
Status:ok
Tags:
Comment:
Attempt to fix the way result data is populated after seeing

PHP fatal error in .../ContributionTrackingStatistics_body.php line 255:
Cannot use object of type stdClass as array

at
https://donate.wikimedia.org/wiki/Special:ContributionTrackingStatistics

(and verifying that it *should* keep the data in the results in the
same order.
Modified paths:
  • /trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php
@@ -251,13 +251,9 @@
252252 );
253253
254254 foreach ( $res as $row ) {
255 - $result[] = array(
256 - $row[0],
257 - $row[1],
258 - $row[2],
259 - $row[3],
260 - $row[4]
261 - );
 255+ foreach( $row as $key => $value ) {
 256+ $result[] = $value;
 257+ }
262258 }
263259 return $result;
264260 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r103627MFT r103371, r103460, r103519, r103626awjrichards23:40, 18 November 2011

Status & tagging log