From c41daf03e80b768f8e8bcea532d2576dfb311c32 Mon Sep 17 00:00:00 2001 From: ebullient Date: Thu, 9 Jan 2003 01:40:00 +0000 Subject: [PATCH] This makes more sense to me, and has been shown not to break anything, and while the other method should probably be fixed at some point, I think this is good for now. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4401 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index 17c15a46..4a97406f 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -80,10 +80,14 @@ function sqimap_fgets($imap_stream) { $read = ''; $buffer = 4096; $results = ''; - while (strpos($read, "\n") === false) { + $offset = 0; + while (strpos($results, "\r\n", $offset) === false) { if (!($read = fgets($imap_stream, $buffer))) { break; } + if ( $results != '' ) { + $offset = strlen($results) - 1; + } $results .= $read; } return $results; -- 2.25.1