Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IMAP/MessageMapper.php')
-rw-r--r--lib/IMAP/MessageMapper.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/IMAP/MessageMapper.php b/lib/IMAP/MessageMapper.php
index 2abfdad40..e5b0e46a6 100644
--- a/lib/IMAP/MessageMapper.php
+++ b/lib/IMAP/MessageMapper.php
@@ -129,7 +129,7 @@ class MessageMapper {
// Determine min UID to fetch, but don't exceed the known maximum
$lower = max(
$min,
- ($highestKnownUid ?? 0) + 1
+ $highestKnownUid + 1
);
// Determine max UID to fetch, but don't exceed the known maximum
$upper = min(
@@ -170,7 +170,7 @@ class MessageMapper {
function (int $uid) use ($highestKnownUid) {
// Don't load the ones we already know
- return $highestKnownUid === null || $uid > $highestKnownUid;
+ return $uid > $highestKnownUid;
}
),
0,
@@ -379,7 +379,11 @@ class MessageMapper {
'ids' => new Horde_Imap_Client_Ids($uid),
]), false);
} catch (Horde_Imap_Client_Exception $e) {
- throw new ServiceException("Could not fetch message source: " . $e->getMessage(), $e->getCode(), $e);
+ throw new ServiceException(
+ "Could not fetch message source: " . $e->getMessage(),
+ (int) $e->getCode(),
+ $e
+ );
}
$msg = array_map(function (Horde_Imap_Client_Data_Fetch $result) {