r81930 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81929‎ | r81930 | r81931 >
Date:06:16, 11 February 2011
Author:demon
Status:ok
Tags:
Comment:
Result objects are objects, not arrays. (fixing breakage from Reedy's mass changes in r75677)
Modified paths:
  • /trunk/extensions/CommunityVoice/Modules/Ratings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CommunityVoice/Modules/Ratings.php
@@ -25,7 +25,7 @@
2626 );
2727 $categories = array();
2828 foreach( $result as $row ) {
29 - $categories[] = (string)$row['vot_category'];
 29+ $categories[] = $row->vot_category;
3030 }
3131 return $categories;
3232 }
@@ -41,7 +41,7 @@
4242 );
4343 $titles = array();
4444 foreach ( $result as $row ) {
45 - $titles[] = (string)$row['vot_title'];
 45+ $titles[] = $row->vot_title;
4646 }
4747 return $titles;
4848 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r819311.17wmf1: MFT r81930catrope06:18, 11 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75677Conditionals in loops to foreachsreedy21:30, 29 October 2010

Status & tagging log