From cdb26ec5b576f4fa1d6994b2a7f86fd06873efd6 Mon Sep 17 00:00:00 2001 From: John Du Hart Date: Wed, 2 Nov 2011 15:15:10 +0000 Subject: [PATCH] Followup r100305, don't try to do a batch query for an empty result (which would cause bug 32134) --- includes/actions/HistoryAction.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index f6d48ea7be..779b4db722 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -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(); -- 2.20.1