"Catrope" changed the status of MediaWiki.r106733 to "ok" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/106733#c28074

Old Status: new
> New Status: ok

Commit summary for MediaWiki.r106733:

AFTv5 - turns out stuffing a DB result object in mcache was less than 
successful. Changing it up to be a nested array has better results.

Catrope's comment:

<pre>
+                       foreach( $rows as $row ) {
+                               $rv[] = array(
+                                       'afi_name'      => $row->afi_name,
+                                       'afi_id'        => $row->afi_id, 
+                                       'afi_data_type' => $row->afi_data_type, 
+                                       'afi_bucket_id' => $row->afi_bucket_id 
+                               );
+                       }
</pre>
You can actually do <code>$rv[] = (array)$row;</code> to convert to an array, 
or even <code>$rv = iterator_to_array( $rows );</code> to convert the DB result 
to an array of row objects (such plain key-value objects are safe to store in 
memc, it's just resource objects like DB results (which contain references to 
DB connections and such) that aren't).

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to