Syntax Error Message shows wrong line in template

0 views
Skip to first unread message

Steve E

unread,
Nov 21, 2009, 9:23:56 PM11/21/09
to Smarty Developers
Hi,

test.tpl:
Test line 1
{invalidfunction}
Test line 2

Code:
$smarty = new Smarty;
$smarty->display('test.tpl');

Error shown:
Fatal error: Uncaught exception 'Exception' with message 'Syntax Error
in template ".\templates\test.tpl" on line 3 "Test line 2" unknown tag
"invalidfunction"' in D:\wamp\www\mempro\smarty\sysplugins
\smarty_internal_templatecompilerbase.php:264

As you can see from the message above, it states the error is on line
3 where the template has "Test line 2", yet the error is the unknown
tag "invalidfunction" on line 2, the line above.

Steve

Uwe.Tews

unread,
Nov 23, 2009, 12:39:38 PM11/23/09
to Smarty Developers
Yes, in some conditions an unknown tag error will show a wrong line
number. I will fix this asap.

On 22 Nov., 03:23, Steve E <st...@effectivemarketingtenerife.com>
wrote:
Reply all
Reply to author
Forward
0 new messages