diff options
Diffstat (limited to 'program/lib')
-rw-r--r-- | program/lib/imap.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc index 8cbb0e02b..8704e78f5 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -941,9 +941,11 @@ function iil_C_Sort(&$conn, $mailbox, $field, $add='', $is_uid=FALSE, } } while (!iil_StartsWith($line, 's ', true)); - if (empty($data)) { - $conn->error = $line; - return false; + $result_code = iil_ParseResult($line); + + if ($result_code != 0) { + $conn->error = 'iil_C_Sort: ' . $line . "\n"; + return false; } $out = explode(' ',$data); @@ -2116,7 +2118,7 @@ function iil_C_Search(&$conn, $folder, $criteria) { $messages = explode(' ', $str); } } while (!iil_StartsWith($line, 'srch1', true)); - + $result_code = iil_ParseResult($line); if ($result_code == 0) { return $messages; |