From fb6ce88e3eac7cdb0d21796cd771ebfa1c747e92 Mon Sep 17 00:00:00 2001 From: fidian Date: Thu, 26 Oct 2000 17:22:43 +0000 Subject: [PATCH] Sometimes hitting Reply made the server practically die. This patch seems to alleviate the problem. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@821 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compose.php b/src/compose.php index 39d3d33b..f31aff05 100644 --- a/src/compose.php +++ b/src/compose.php @@ -74,8 +74,10 @@ sqUnWordWrap($body); $body_ary = explode("\n", $body); - while (ereg("^[>\s]*$", $body_ary[count($body_ary) - 1])) { - unset($body_ary[count($body_ary) - 1]); + $i = count($body_ary) - 1; + while (isset($body_ary[$i]) && ereg("^[>\s]*$", $body_ary[$i])) { + unset($body_ary[$i]); + $i --; } $body = ""; for ($i=0; $i < count($body_ary); $i++) { -- 2.25.1