From: ondrass Date: Thu, 8 Nov 2001 21:05:14 +0000 (+0000) Subject: We have to know when there is attachment with size 0 and when there is no size (... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=554120537f88194b762784be92aeeb78cfd1a774;p=squirrelmail.git We have to know when there is attachment with size 0 and when there is no size ($size is set to -1 now). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1707 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_general.php b/functions/imap_general.php index 674896fb..d4c61c34 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -56,11 +56,11 @@ $imap_general_debug = false; flush(); } - $size = 0; + $size = -1; $data[] = $read; $read = fgets($imap_stream, 9096); } else { - $size = 0; + $size = -1; } while (1) { while (strpos($read, "\n") === false) { @@ -95,7 +95,7 @@ $imap_general_debug = false; $total_size += strlen($read); } else { if (ereg("^$pre (OK|BAD|NO)(.*)", $read, $regs) || - ereg("^\\* [0-9]+ FETCH.*", $read, $regs)) { + (($size == -1) && ereg("^\\* [0-9]+ FETCH.*", $read, $regs))) { break; } else { $data[] = $read;