Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch while...
[lhc/web/wiklou.git] / includes / api / ApiQueryLogEvents.php
index 2858726..1aed1ba 100644 (file)
@@ -154,7 +154,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
 
                $count = 0;
                $res = $this->select( __METHOD__ );
-               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...
                                $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->log_timestamp ) );