diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-11-05 19:22:09 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-11-05 19:24:31 +0100 |
commit | 4f72978af37a72ddf9c5bfb9b78930417c9c9d2a (patch) | |
tree | 69af569dee2e93a9113584dd9e06198dfbcf5028 /program/include/rcube_imap_generic.php | |
parent | 79f1c6f8091525aee2a6b64836c8f5e25dc7b79c (diff) |
Fixed rcube_imap_generic::uncompressMessageSet() result when argument is empty. Added tests.
Conflicts:
tests/Framework/ImapGeneric.php
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r-- | program/include/rcube_imap_generic.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 16c8917ab..d462dd141 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -3590,6 +3590,10 @@ class rcube_imap_generic */ static function uncompressMessageSet($messages) { + if (empty($messages)) { + return array(); + } + $result = array(); $messages = explode(',', $messages); @@ -3598,7 +3602,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]); } |