|
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 |
shwekhaw Smarty Rookie
Joined: 07 Apr 2005 Posts: 10
|
Posted: Tue May 28, 2019 2:18 am Post subject: upgrading 2.6.28 to 3.1.21 |
|
|
Hi. I am moving the site from 2.6.28 to 3.1.21 I am getting fatal php error for substr modifier in in variables with $variable|substr due to security. Is there work around to this?
Also I have noticed that variables in the format { $variable } will no longer work in 3.1.21 unless I remove spaces and change to {$variable}. Those variable were fine under 2.6.28 |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue May 28, 2019 4:53 am Post subject: |
|
|
Quote: | I am getting fatal php error for substr modifier in in variables with $variable|substr due to security. |
What is the error text?
Quote: | I have noticed that variables in the format { $variable } will no longer work in 3.1.21 unless I remove spaces and change to {$variable} |
Of course. Read the documentation, it should have never been written as "{ $variable }" in first place. |
|
Back to top |
|
shwekhaw Smarty Rookie
Joined: 07 Apr 2005 Posts: 10
|
Posted: Tue May 28, 2019 6:26 am Post subject: |
|
|
[quote="AnrDaemon"] Quote: | I am getting fatal php error for substr modifier in in variables with $variable|substr due to security. |
What is the error text?
It is as follows.
[28-May-2019 03:17:26 UTC] PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/var/www/vhosts/xxxxxxxxxxxxxxxorder_PO_v2.tpl" on line 313 "<TD height="16" align="left" valign="middle" class="prData">{$product.productcode|substr:3}</TD>" modifier 'substr' not allowed by security setting <--
thrown in /var/www/vhostsxxxxxxxxxx/smarty_internal_templatecompilerbase.php on line 313 |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
|
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
|