|
@@ -219,20 +219,20 @@ function sqimap_fread($imap_stream,$iSize,$filter=false,
|
|
if ($iRemaining < $iBufferSize) {
|
|
if ($iRemaining < $iBufferSize) {
|
|
$iBufferSize = $iRemaining;
|
|
$iBufferSize = $iRemaining;
|
|
}
|
|
}
|
|
- if (!$sRead) {
|
|
|
|
|
|
+ if ($sRead == '') {
|
|
$results = false;
|
|
$results = false;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- if ($sReadRem) {
|
|
|
|
|
|
+ if ($sReadRem != '') {
|
|
$sRead = $sReadRem . $sRead;
|
|
$sRead = $sReadRem . $sRead;
|
|
$sReadRem = '';
|
|
$sReadRem = '';
|
|
}
|
|
}
|
|
|
|
|
|
- if ($filter && $sRead) {
|
|
|
|
|
|
+ if ($filter && $sRead != '') {
|
|
// in case the filter is base64 decoding we return a remainder
|
|
// in case the filter is base64 decoding we return a remainder
|
|
$sReadRem = $filter($sRead);
|
|
$sReadRem = $filter($sRead);
|
|
}
|
|
}
|
|
- if ($outputstream && $sRead) {
|
|
|
|
|
|
+ if ($outputstream && $sRead != '') {
|
|
if (is_resource($outputstream)) {
|
|
if (is_resource($outputstream)) {
|
|
fwrite($outputstream,$sRead);
|
|
fwrite($outputstream,$sRead);
|
|
} else if ($outputstream == 'php://stdout') {
|
|
} else if ($outputstream == 'php://stdout') {
|
|
@@ -989,4 +989,4 @@ function map_yp_alias($username) {
|
|
return chop(substr($yp, strlen($username)+1));
|
|
return chop(substr($yp, strlen($username)+1));
|
|
}
|
|
}
|
|
|
|
|
|
-?>
|
|
|
|
|
|
+?>
|