Removed variables that were initialized, but never actually used
[squirrelmail.git] / functions / imap_general.php
index 3f6c284a15ae3ce726bbe80ed3b76a3913a3b780..8a117dec5ef07e0e478fd562d95da6d594239822 100755 (executable)
@@ -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') {
@@ -320,7 +320,7 @@ function sqimap_retrieve_imap_response($imap_stream, $tag, $handle_errors,
     $resultlist = array();
     $data = array();
     $read = sqimap_fgets($imap_stream);
-    $i = $k = 0;
+    $i = 0;
     while ($read) {
         $char = $read{0};
         switch ($char)
@@ -548,7 +548,7 @@ function sqimap_read_data ($imap_stream, $tag_uid, $handle_errors,
  * @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'))) {
@@ -989,4 +989,4 @@ function map_yp_alias($username) {
    return chop(substr($yp, strlen($username)+1));
 }
 
-?>
\ No newline at end of file
+?>