diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-08 12:46:05 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-08 12:46:05 +0000 |
| commit | d9daaac0849808d71f20faed21df4b51a3df0186 (patch) | |
| tree | eb62d478cc4d477d5da3c82fae4c0eeb4f01540d /roundcubemail/program/include/rcube_imap_generic.php | |
| parent | 1f6d9ef93e019d30c6afbfcb401620c2bab6f2c5 (diff) | |
- Fix some IMAP errors handling when opening the message (#1485443)
git-svn-id: https://svn.roundcube.net/trunk@3726 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_imap_generic.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap_generic.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/roundcubemail/program/include/rcube_imap_generic.php b/roundcubemail/program/include/rcube_imap_generic.php index d5a5e3d4b..7669ceb32 100644 --- a/roundcubemail/program/include/rcube_imap_generic.php +++ b/roundcubemail/program/include/rcube_imap_generic.php @@ -1777,12 +1777,11 @@ class rcube_imap_generic $mode = 0; } + // format request $reply_key = '* ' . $id; - $result = false; + $key = 'ftch0'; + $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id (BODY.PEEK[$part])"; - // format request - $key = 'ftch0'; - $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id (BODY.PEEK[$part])"; // send request if (!$this->putLine($request)) { return false; @@ -1794,7 +1793,8 @@ class rcube_imap_generic $a = explode(' ', $line); } while (!($end = $this->startsWith($line, $key, true)) && $a[2] != 'FETCH'); - $len = strlen($line); + $len = strlen($line); + $result = false; // handle empty "* X FETCH ()" response if ($line[$len-1] == ')' && $line[$len-2] != '(') { @@ -1890,7 +1890,7 @@ class rcube_imap_generic $line = $this->readLine(1024); } while (!$this->startsWith($line, $key, true)); - if ($result) { + if ($result !== false) { if ($file) { fwrite($file, $result); } else if ($print) { |
