From 8acf6204b1b56388cab8fc3db67b686fb950ba0e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 8 Jul 2013 08:47:13 +0200 Subject: Fix "could not load message" error on valid empty message body (#1489228) --- program/lib/Roundcube/rcube_imap_generic.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'program/lib/Roundcube/rcube_imap_generic.php') diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 9b11624a7..70ffd0d10 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -2543,7 +2543,11 @@ class rcube_imap_generic $prev = ''; $found = true; - while ($bytes > 0) { + // empty body + if (!$bytes) { + $result = ''; + } + else while ($bytes > 0) { $line = $this->readLine(8192); if ($line === NULL) { -- cgit v1.2.3