The template class should really trigger our error handler instead of printing out error messages HEAD
authorDirk Haun <dirk@haun-online.de>
Sat Oct 17 19:54:49 2009 +0200 (2009-10-17)
branchHEAD
changeset 7384062fc7ef2c35
parent 7383 2b8b42245059
child 7385 12aa30c5bdb4
The template class should really trigger our error handler instead of printing out error messages
system/classes/template.class.php
     1.1 --- a/system/classes/template.class.php	Sat Oct 17 14:09:44 2009 +0200
     1.2 +++ b/system/classes/template.class.php	Sat Oct 17 19:54:49 2009 +0200
     1.3 @@ -894,9 +894,11 @@
     1.4        $this->haltmsg($msg);
     1.5      }
     1.6  
     1.7 +    /* we won't be coming back from haltmsg() in that case anyway
     1.8      if ($this->halt_on_error == 'yes') {
     1.9        die("<b>Halted.</b>");
    1.10      }
    1.11 +    */
    1.12  
    1.13      return false;
    1.14    }
    1.15 @@ -915,7 +917,11 @@
    1.16    * @see       halt
    1.17    */
    1.18    function haltmsg($msg) {
    1.19 -    printf("<b>Template Error:</b> %s<br" . XHTML . ">\n", $msg);
    1.20 +    if ($this->halt_on_error == 'yes') {
    1.21 +      trigger_error(sprintf("Template Error: %s", $msg));
    1.22 +    } else {
    1.23 +      printf("<b>Template Error:</b> %s<br" . XHTML . ">\n", $msg);
    1.24 +    }
    1.25    }
    1.26  
    1.27  }