Fix error with trying to resend the header on a fatal error.
authorstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 31 Aug 2006 14:14:28 +0000 (14:14 +0000)
committerstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 31 Aug 2006 14:14:28 +0000 (14:14 +0000)
We *really* need to figure out why changes to member variables aren't being remembered outside of the member function in which they are changed.  This is afflicting the Template class and the Error class.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11662 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/error.class.php

index 9b023e0e9c5bb50331d0ac57c9aa23b010671748..c741307effadc9887c7c187feb584ef8e6139305 100644 (file)
@@ -63,6 +63,7 @@ class ErrorHandler {
      */
     function HeaderSent() {
         $this->header_sent = true;
      */
     function HeaderSent() {
         $this->header_sent = true;
+        $this->Template->assign('header_sent', true);
     }
 
     /**
     }
 
     /**
@@ -218,7 +219,7 @@ class ErrorHandler {
 
         // Show the error immediate in case of fatal errors
         if ($iType == SQM_ERROR) {
 
         // Show the error immediate in case of fatal errors
         if ($iType == SQM_ERROR) {
-            if (!$this->header_sent) {
+            if (!$this->header_sent || (isset($this->Template->values['header_sent']) && !$this->Template->values['header_sent'])) {
                 // TODO replace this with template that can be assigned
                 displayHtmlHeader(_("Error"),'',false);
             }
                 // TODO replace this with template that can be assigned
                 displayHtmlHeader(_("Error"),'',false);
             }