cvs: pear /Pager_Sliding Sliding.php
| From: | Lorenzo Alberton | Date: | Tue, 09 Sep 2003 12:24:10 +0000 |
| Subject: | cvs: pear /Pager_Sliding Sliding.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12571@lists.php.net to get a copy of this message | ||
quipo Tue Sep 9 08:24:10 2003 EDT
Modified files:
/pear/Pager_Sliding Sliding.php
Log:
added a check to suppress NOTICE when a custom error handling method is used.
@see bug report #25449
Index: pear/Pager_Sliding/Sliding.php
diff -u pear/Pager_Sliding/Sliding.php:1.16 pear/Pager_Sliding/Sliding.php:1.17
--- pear/Pager_Sliding/Sliding.php:1.16 Mon Sep 1 18:08:46 2003
+++ pear/Pager_Sliding/Sliding.php Tue Sep 9 08:24:10 2003
@@ -15,7 +15,7 @@
// | Author: Lorenzo Alberton <l.alberton at quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: Sliding.php,v 1.16 2003/09/01 22:08:46 quipo Exp $
+// $Id: Sliding.php,v 1.17 2003/09/09 12:24:10 quipo Exp $
/**
* File Sliding.php
*
@@ -34,7 +34,7 @@
* Usage examples can be found in the doc provided
*
* @author Lorenzo Alberton <l.alberton at quipo.it>
- * @version $Id: Sliding.php,v 1.16 2003/09/01 22:08:46 quipo Exp $
+ * @version $Id: Sliding.php,v 1.17 2003/09/09 12:24:10 quipo Exp $
* @package Pager_Sliding
*/
class Pager_Sliding
@@ -1086,7 +1086,11 @@
$this->_spacesAfter .= ' ';
}
- $this->_currentPage = max((int)@$_GET[$this->_urlVar], 1);
+ if (isset($_GET[$this->_urlVar])) {
+ $this->_currentPage = max((int)@$_GET[$this->_urlVar], 1);
+ } else {
+ $this->_currentPage = 1;
+ }
}
// }}}