|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
smartynewb Smarty n00b
Joined: 17 Jul 2015 Posts: 1
|
Posted: Fri Jul 17, 2015 8:31 am Post subject: error |
|
|
Hello,
I'm using the below:
Code: | <input type="hidden" name="rootpw" size="20" value="{php}$rdmpw = substr(md5(rand().rand()), 0, 10); echo $rdmpw;{/php}" /> |
However, our billing system, WHMCS, is presenting us with the following error:
Quote: | Smarty Error: Syntax error in template "/home/user/public_html/clients/templates/orderforms/modern/configureproduct.tpl" on line 50 "<input type="hidden" name="rootpw" size="20" value="{php}$rdmpw = substr(md5(rand().rand()), 0, 10); echo $rdmpw;{/php}" />" unknown tag "php" |
This was working perfectly fine when running on Smarty 2.x, but that is no longer the case since switching to Smarty 3.x.
Any help or feedback would be much appreciated.
Many thanks. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Jul 18, 2015 12:26 am Post subject: |
|
|
This shouldn't have been USED with Smarty 2, to begin with.
Direct code execution in template was always discouraged.
Fix your template. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Jul 20, 2015 2:22 am Post subject: |
|
|
{php} tags are deprecated and not available in the Smarty class of 3.1.
They are still available if you use the SmartyBC class. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|