diff --git a/Smarty.class.php b/Smarty.class.php index 9001130b..27e5c80f 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -564,6 +564,15 @@ class Smarty return true; } +/*======================================================================*\ + Function: _syntax_error + Purpose: display Smarty syntax error +\*======================================================================*/ + function _syntax_error($error_msg, $error_type = E_USER_ERROR) + { + trigger_error("Smarty: [in " . $this->_current_file . " line " . + $this->_current_line_no . "]: syntax error: $error_msg", $error_type); + } } /* vim: set expandtab: */ diff --git a/docs.sgml b/docs.sgml index e20d3350..d90a9501 100644 --- a/docs.sgml +++ b/docs.sgml @@ -2338,7 +2338,7 @@ OUTPUT: {* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *} -{math equation="height * padding / division" +{math equation="height * width / division" height=$row_height width=$row_width division=#col_div#} diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 9001130b..27e5c80f 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -564,6 +564,15 @@ class Smarty return true; } +/*======================================================================*\ + Function: _syntax_error + Purpose: display Smarty syntax error +\*======================================================================*/ + function _syntax_error($error_msg, $error_type = E_USER_ERROR) + { + trigger_error("Smarty: [in " . $this->_current_file . " line " . + $this->_current_line_no . "]: syntax error: $error_msg", $error_type); + } } /* vim: set expandtab: */