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_storage.php | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index e53e105..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; + } } /** @@ -405,7 +408,7 @@ /** * Fetch message headers and body structure from the server and build - * an object structure similar to the one generated by PEAR::Mail_mimeDecode + * an object structure. * * @param int $uid Message UID to fetch * @param string $folder Folder to read from -- Gitblit v1.9.1