From 0868c2e841739baf1054a3b332245d3ec29251e6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 06 Aug 2015 03:25:15 -0400 Subject: [PATCH] Make sure list page is never set to 0 (#1490458) --- program/lib/Roundcube/rcube_imap.php | 1 - program/lib/Roundcube/rcube_storage.php | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 9a4843d..b8230a7 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -57,7 +57,6 @@ protected $icache = array(); protected $plugins; - protected $list_page = 1; protected $delimiter; protected $namespace; protected $sort_field = ''; diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index 1a6c1f3..c427f48 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -47,6 +47,7 @@ protected $search_set; protected $options = array('auth_type' => 'check'); protected $page_size = 10; + protected $list_page = 1; protected $threading = false; /** @@ -206,7 +207,9 @@ */ public function set_page($page) { - $this->list_page = (int) $page; + if ($page = intval($page)) { + $this->list_page = $page; + } } /** -- Gitblit v1.9.1