From b5b55ec0262361874f9f5a607f8ed49dfda62a6b Mon Sep 17 00:00:00 2001 From: mwalker Date: Mon, 24 Sep 2012 16:35:24 -0700 Subject: [PATCH] Fixing bug where end limit would not be calculated In the pager object, if the query was constructed such that the index was a fully qualified field then the 'past the end' index reference would not get computed. This is because $mIndexField stores the FQ field name but $mPastTheEndRow is indexed on the non FQ name. Therefore a warning would be generated due to a non existent array key. Change-Id: I52e1cbc8f7dad07de1ba5ba3bdfa2d107dfb4d93 --- includes/Pager.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/Pager.php b/includes/Pager.php index 96ba446e55..077430d27d 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -287,8 +287,7 @@ abstract class IndexPager extends ContextSource implements Pager { if ( $numRows > $this->mLimit && $numRows > 1 ) { $res->seek( $numRows - 1 ); $this->mPastTheEndRow = $res->fetchObject(); - $indexField = $this->mIndexField; - $this->mPastTheEndIndex = $this->mPastTheEndRow->$indexField; + $this->mPastTheEndIndex = $this->mPastTheEndRow->$indexColumn; $res->seek( $numRows - 2 ); $row = $res->fetchRow(); $lastIndex = $row[$indexColumn]; -- 2.20.1