From 3bc5ef2df787326ceba9cf40f880e353d2e998f4 Mon Sep 17 00:00:00 2001 From: fidian Date: Fri, 2 Feb 2001 23:55:25 +0000 Subject: [PATCH] Forgot to use isset() instead of count() because I unset values in the array when I am done with them (frees up memory). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1049 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compose.php b/src/compose.php index 66cd551c..302cab44 100644 --- a/src/compose.php +++ b/src/compose.php @@ -73,19 +73,19 @@ } else { $body = ""; } - + if ($message->header->type1 == "html") $body = strip_tags($body); sqUnWordWrap($body); $body_ary = explode("\n", $body); $i = count($body_ary) - 1; - while (isset($body_ary[$i]) && ereg("^[>\\s]*$", $body_ary[$i])) { + while ($i >= 0 && ereg("^[>\\s]*$", $body_ary[$i])) { unset($body_ary[$i]); $i --; } $body = ""; - for ($i=0; $i < count($body_ary); $i++) { + for ($i=0; isset($body_ary[$i]); $i++) { if (! $forward_id) { if (ereg('^[\\s>]+', $body_ary[$i])) -- 2.25.1