Re: missing _syntax_error in smarty 1.3.1?
| From: | Monte Ohrt | Date: | Thu, 08 Mar 2001 20:16:10 +0000 |
| Subject: | Re: missing _syntax_error in smarty 1.3.1? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-350@lists.php.net to get a copy of this message | ||
It IS missing!
For a quick fix, paste this at the bottom of the Smarty.class.php file,
right after the _set_error_msg function:
/*======================================================================*\
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);
}
Let me know if this works. I'll get this fix out right away.
Monte
Roel Vanhout wrote:
>
> Hello all,
>
> Is it me or is there a function missing in Smarty 1.3.1?
>
> Fatal error: Call to undefined function: _syntax_error() in Smarty_Compiler.class.php on line
> 297
>
> [roel@gondor Smarty-1.3.1]$ grep -rn _syntax *
> Smarty_Compiler.class.php:297: $this->_syntax_error("unknown tag -
> '$tag_command'", E_USER_WARNING);
> Smarty_Compiler.class.php:312: $this->_syntax_error("custom function
> '$tag_command' is not implemented", E_USER_WARNING);
> Smarty_Compiler.class.php:336: $this->_syntax_error("missing insert name");
> Smarty_Compiler.class.php:358: $this->_syntax_error("missing 'file' attribute
> in config_load tag");
> Smarty_Compiler.class.php:385: $this->_syntax_error("missing 'file' attribute
> in include tag");
> Smarty_Compiler.class.php:425: $this->_syntax_error("missing section name");
> Smarty_Compiler.class.php:623: $this->_syntax_error("expecting 'by' after
> 'div'");
> Smarty_Compiler.class.php:628: $this->_syntax_error("unknown 'is' expression
> - '$expr_type'");
> Smarty_Compiler.class.php:672: $this->_syntax_error("invalid attribute name -
> '$token'");
> Smarty_Compiler.class.php:680: $this->_syntax_error("expecting '=' after
> attribute name");
> Smarty_Compiler.class.php:704: $this->_syntax_error("'=' cannot be an
> attribute value");
> Smarty_Compiler.class.php:870: $this->_syntax_error("modifier
> '$modifier_name' is not implemented", E_USER_WARNING);
> [roel@gondor Smarty-1.3.1]$
>
> No function declaration? In Smarty 1.3.0, it was defined in
> Smarty.class.php.
>
> cheers,
>
> roel
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/