From: indiri69 Date: Fri, 29 Oct 2004 18:15:59 +0000 (+0000) Subject: Should compared strings with strings. Otherwise a string of just '0' is treated... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=13aabbcf10c11d0e41d2d1ef1e820d7c60947af0 Should compared strings with strings. Otherwise a string of just '0' is treated as false git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8276 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/ChangeLog b/ChangeLog index 37332a36..9cc82fb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -136,6 +136,8 @@ Version 1.5.1 -- CVS - Added site configuration and custom translation engine support to translate plugin. - Fixed SquirrelSpell error output. Patch courtesy David Boone. + - Fixed bug in IMAP read routines that treated "0" as false instead of + a string (patch courtesy Maurice Makaay). Version 1.5.0 -------------------- diff --git a/functions/imap_general.php b/functions/imap_general.php index 3f6c284a..f3c1ffaa 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -219,20 +219,20 @@ function sqimap_fread($imap_stream,$iSize,$filter=false, if ($iRemaining < $iBufferSize) { $iBufferSize = $iRemaining; } - if (!$sRead) { + if ($sRead == '') { $results = false; break; } - if ($sReadRem) { + if ($sReadRem != '') { $sRead = $sReadRem . $sRead; $sReadRem = ''; } - if ($filter && $sRead) { + if ($filter && $sRead != '') { // in case the filter is base64 decoding we return a remainder $sReadRem = $filter($sRead); } - if ($outputstream && $sRead) { + if ($outputstream && $sRead != '') { if (is_resource($outputstream)) { fwrite($outputstream,$sRead); } else if ($outputstream == 'php://stdout') { @@ -989,4 +989,4 @@ function map_yp_alias($username) { return chop(substr($yp, strlen($username)+1)); } -?> \ No newline at end of file +?>