Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Using direct php functions allowed

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
shwekhaw
Smarty Rookie


Joined: 07 Apr 2005
Posts: 8

PostPosted: Wed Dec 10, 2014 4:45 pm    Post subject: Using direct php functions allowed Reply with quote

In our old code we had if statement with strpos($haystack,$needle) format just like php code syntax. I get following error in log file. However the code still works regardless of error.
Code:

Error: Smarty error: [in order.tpl line 72]: syntax error: (secure mode) 'strpos' not allowed in if statement (Smarty_Compiler.class.php, line 1399)

I created modifier and changing $haystack|strpos:$needle format to make it working smarty way. But shouldn't Smarty be stopping the code from working if it is security issue? Is there a setting that you turn on to stop direct use of such php function in smarty?
By the way.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP