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') {
$resultlist = array();
$data = array();
$read = sqimap_fgets($imap_stream);
- $i = $k = 0;
+ $i = 0;
while ($read) {
$char = $read{0};
switch ($char)
* @return imap-stream resource identifier
*/
function sqimap_create_stream($server,$port,$tls=false) {
- global $username, $use_imap_tls, $squirrelmail_language;
+ global $squirrelmail_language;
if ($tls == true) {
if ((check_php_version(4,3)) and (extension_loaded('openssl'))) {
return chop(substr($yp, strlen($username)+1));
}
-?>
\ No newline at end of file
+?>