From ec0b7dbda5eb9490db1a41c45f6d1d76b708fb7e Mon Sep 17 00:00:00 2001 From: fidian Date: Fri, 15 Dec 2000 15:40:21 +0000 Subject: [PATCH] Another array detection "if" statement. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@891 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index c3c30301..f6c8e79b 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -17,11 +17,11 @@ global $color, $squirrelmail_language, $imap_general_debug; $counter = 0; - do { + do { $data[$counter] = $read = fgets ($imap_stream, 4096); if ($imap_general_debug) { echo "$read
"; 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]); @@ -89,9 +89,12 @@ printf (_("Unknown error: %s") . "
\n", $message); echo "
"; echo _("Read data:") . "
\n"; - foreach ($read as $line) - { - echo htmlspecialchars($line) . "
\n"; + if (is_array($read)) + { + foreach ($read as $line) + { + echo htmlspecialchars($line) . "
\n"; + } } exit; } else { -- 2.25.1