Sometimes hitting Reply made the server practically die. This patch seems
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Oct 2000 17:22:43 +0000 (17:22 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Oct 2000 17:22:43 +0000 (17:22 +0000)
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

index 39d3d33bb7a97cf479966ee0ab470204666bda94..f31aff053cfc5356dc655ed4050fef9816942f7e 100644 (file)
          
          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++) {