|
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 |
Aristophan Smarty Regular
Joined: 10 Jan 2011 Posts: 96
|
Posted: Thu Dec 22, 2011 4:09 pm Post subject: include_php in SmartyBC class missing? |
|
|
The error SmartyException("{include_php} is deprecated, use SmartyBC class to enable"); in smarty_internal_compile_include_php.php, tells to use the SmartyBC class, but is that maybe missing in there? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Dec 22, 2011 4:42 pm Post subject: |
|
|
Just include the SmartyBC.class.pnp file and create the $smarty instance using SmartyBC.
$smarty = new SmartyBC() |
|
Back to top |
|
Aristophan Smarty Regular
Joined: 10 Jan 2011 Posts: 96
|
Posted: Thu Dec 22, 2011 5:31 pm Post subject: |
|
|
Is it that easy?
I am sorry digging into, without me knowing if I ever will use it personally, but...
Which method or property in SmartyBC() takes care about it? None, as I can see in include_php.php. It just asks, if BC instance exists.
But if anybody needs to clone this part only, partitially per demand, the one has no other possibility else to generally extend SmartyBC(). Couldn't this be done better? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Dec 22, 2011 5:42 pm Post subject: |
|
|
The better solution is not to use {include_php} at all but write a funtion plugin instead.
{include_php} does open doors for code injection. |
|
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
|