[pLog-svn] r3495 - plog/trunk/class/data/pager

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed May 31 16:08:16 GMT 2006


Author: jondaley
Date: 2006-05-31 16:08:15 +0000 (Wed, 31 May 2006)
New Revision: 3495

Modified:
   plog/trunk/class/data/pager/pager.class.php
Log:
fixes http://forums.lifetype.net/viewtopic.php?p=26180 where a user (probably) set the pager value to 0, causing a divide by zero error

Modified: plog/trunk/class/data/pager/pager.class.php
===================================================================
--- plog/trunk/class/data/pager/pager.class.php	2006-05-29 19:07:47 UTC (rev 3494)
+++ plog/trunk/class/data/pager/pager.class.php	2006-05-31 16:08:15 UTC (rev 3495)
@@ -73,7 +73,7 @@
             $this->_baseUrl     = $baseUrl;
 			$this->_curPage     = $curPage;
             $this->_totalRegs   = $totalRegs;
-            $this->_regsForPage = $regsForPage;
+            $this->_regsForPage = ($regsForPage < 1) ? DEFAULT_PAGER_REGS_FOR_PAGE : $regsForPage;
             $this->_maxPages    = DEFAULT_PAGER_MAX_PAGES;
 			
 			$this->_init();



More information about the pLog-svn mailing list