Another array detection "if" statement.
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 15 Dec 2000 15:40:21 +0000 (15:40 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 15 Dec 2000 15:40:21 +0000 (15:40 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@891 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php

index c3c303019fc88f62cdb54822673d022b1ca57358..f6c8e79b7a8c2dcceb37d1658e5cd1450b65a762 100755 (executable)
       global $color, $squirrelmail_language, $imap_general_debug;
 
       $counter = 0;
-         do {
+      do {
           $data[$counter] = $read = fgets ($imap_stream, 4096);
           if ($imap_general_debug) { echo "<small><tt><font color=cc0000>$read</font></tt></small><br>"; flush(); }
           $counter++;
-         } while (! ereg("^$pre (OK|BAD|NO)(.*)$", $read, $regs));
+      } while (! ereg("^$pre (OK|BAD|NO)(.*)$", $read, $regs));
 
       $response = $regs[1];
       $message = trim($regs[2]);
                    printf (_("Unknown error: %s") . "<br>\n", $message);
                echo "<br>";
                echo _("Read data:") . "<br>\n";
-               foreach ($read as $line)
-               {
-                   echo htmlspecialchars($line) . "<br>\n";
+              if (is_array($read))
+              {
+                   foreach ($read as $line)
+                   {
+                       echo htmlspecialchars($line) . "<br>\n";
+                  }
                }
                exit;
             } else {