Followup r100305, don't try to do a batch query for an empty result (which would...
authorJohn Du Hart <johnduhart@users.mediawiki.org>
Wed, 2 Nov 2011 15:15:10 +0000 (15:15 +0000)
committerJohn Du Hart <johnduhart@users.mediawiki.org>
Wed, 2 Nov 2011 15:15:10 +0000 (15:15 +0000)
includes/actions/HistoryAction.php

index f6d48ea..779b4db 100644 (file)
@@ -385,6 +385,11 @@ class HistoryPager extends ReverseChronologicalPager {
        }
 
        function doBatchLookups() {
+               # No results? Nothing to batch
+               if ( !$this->mResult->numRows() ) {
+                       return;
+               }
+
                # Do a link batch query
                $this->mResult->seek( 0 );
                $batch = new LinkBatch();