Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch while...
[lhc/web/wiklou.git] / includes / api / ApiQueryUserContributions.php
index a337c1d..5b00dc3 100644 (file)
@@ -91,7 +91,7 @@ class ApiQueryContributions extends ApiQueryBase {
                $limit = $this->params['limit'];
 
                // Fetch each row
-               while ( $row = $db->fetchObject( $res ) ) {
+               foreach ( $res as $row ) {
                        if ( ++ $count > $limit ) {
                                // We've reached the one extra which shows that there are additional pages to be had. Stop here...
                                if ( $this->multiUserMode ) {