From e68fa71b0eb66a12adcdf35c411c6f83970749ec Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 5 Nov 2012 19:22:09 +0100 Subject: Fixed rcube_imap_generic::uncompressMessageSet() result when argument is empty. Added tests. --- program/include/rcube_imap_generic.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'program/include/rcube_imap_generic.php') diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 52bf0e37a..9c525dcba 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -3530,6 +3530,10 @@ class rcube_imap_generic */ static function uncompressMessageSet($messages) { + if (empty($messages)) { + return array(); + } + $result = array(); $messages = explode(',', $messages); @@ -3538,7 +3542,7 @@ class rcube_imap_generic $max = max($items[0], $items[1]); for ($x=$items[0]; $x<=$max; $x++) { - $result[] = $x; + $result[] = (int)$x; } unset($messages[$idx]); } -- cgit v1.2.3