mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Smarty_Compiler::_syntax_error() uses Smarty::_trigger_fatal_error() now instead of the trigger_error()-function
This commit is contained in:
@@ -561,7 +561,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
} else if ($this->_compile_custom_tag($tag_command, $tag_args, $tag_modifier, $output)) {
|
} else if ($this->_compile_custom_tag($tag_command, $tag_args, $tag_modifier, $output)) {
|
||||||
return $output;
|
return $output;
|
||||||
} else {
|
} 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)
|
function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null)
|
||||||
{
|
{
|
||||||
if(isset($file) && isset($line)) {
|
$this->_trigger_fatal_error("syntax error: $error_msg", $this->_current_file, $this->_current_line_no, $file, $line, $error_type);
|
||||||
$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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user