Skip to content

Commit

Permalink
Fix BC break intruduced in the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Nov 21, 2024
1 parent 785e9bc commit 66c1363
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_imap_cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ public function synchronize($mailbox)
$mbox_data = $this->imap->folder_data($mailbox);

// Removed messages found
$uids = isset($mbox_data['VANISHED']) ? rcube_imap_generic::uncompressMessageSet($mbox_data['VANISHED']) : null;
$uids = !empty($mbox_data['VANISHED']) ? rcube_imap_generic::uncompressMessageSet($mbox_data['VANISHED']) : null;
if (!empty($uids)) {
$removed = array_merge($removed, $uids);
// Invalidate index
Expand Down
7 changes: 4 additions & 3 deletions program/lib/Roundcube/rcube_imap_generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,8 @@ public function fetchHeaderIndex($mailbox, $message_set, $index_field = '', $ski
{
// Validate input
if (is_array($message_set)) {
if (($message_set = $this->compressMessageSet($message_set)) === 'INVALID') {
$message_set = $this->compressMessageSet($message_set);
if ($message_set === '' || $message_set === 'INVALID') {
return false;
}
} elseif (empty($message_set)) {
Expand Down Expand Up @@ -4042,7 +4043,7 @@ protected static function r_implode($element)
* @param array|string $messages Message identifiers
* @param bool $force Forces compression of any size
*
* @return string Compressed sequence-set or 'INVALID' on invalid or empty input
* @return string Compressed sequence-set or 'INVALID' on invalid input
*/
public static function compressMessageSet($messages, $force = false)
{
Expand All @@ -4064,7 +4065,7 @@ public static function compressMessageSet($messages, $force = false)
}

if (empty($messages)) {
return 'INVALID';
return '';
}

sort($messages);
Expand Down

0 comments on commit 66c1363

Please sign in to comment.