From 53baf8295ad1b78e54706f6b70478db7e8e71875 Mon Sep 17 00:00:00 2001 From: messju Date: Sun, 25 Jan 2004 15:39:10 +0000 Subject: [PATCH] Smarty_Compiler::_syntax_error() uses Smarty::_trigger_fatal_error() now instead of the trigger_error()-function --- libs/Smarty_Compiler.class.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 21b40131..ed51f131 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -561,7 +561,7 @@ class Smarty_Compiler extends Smarty { } else if ($this->_compile_custom_tag($tag_command, $tag_args, $tag_modifier, $output)) { return $output; } else { - $this->_syntax_error("unrecognized tag '$tag_command'", E_USER_WARNING, __FILE__, __LINE__); + $this->_syntax_error("unrecognized tag '$tag_command'", E_USER_ERROR, __FILE__, __LINE__); } } @@ -2133,13 +2133,7 @@ class Smarty_Compiler extends Smarty { */ function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null) { - if(isset($file) && isset($line)) { - $info = ' ('.basename($file).", line $line)"; - } else { - $info = null; - } - trigger_error('Smarty: [in ' . $this->_current_file . ' line ' . - $this->_current_line_no . "]: syntax error: $error_msg$info", $error_type); + $this->_trigger_fatal_error("syntax error: $error_msg", $this->_current_file, $this->_current_line_no, $file, $line, $error_type); }