|
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 |
tpanula Smarty Rookie
Joined: 19 May 2003 Posts: 6
|
Posted: Thu Apr 25, 2013 1:03 pm Post subject: {nocache}{$email|escape:"hexentity"}{/nocache} =&g |
|
|
I experienced a wacky error, so I wen't on to investigate.
To reproduce:
1. download clean smarty 3.1.13 (atm latest)
2. here is my php code:
Code: | <?php
require('../libs/Smarty.class.php');
$smarty = new Smarty;
$smarty->force_compile = true;
$smarty->debugging = true;
//$smarty->caching = true;
//$smarty->cache_lifetime = 120;
$smarty->assign("email", "user@somewhere.com");
$smarty->display('bug.tpl');
?> |
3. here is my template:
Code: | {nocache}{$email|escape:"hexentity"}{/nocache}
|
4. and here is the result:
Code: |
/*%%SmartyNocache:39826525151792530f244f3-81016701%%*/smarty; if (!is_callable('smarty_modifier_escape')) include '/sites/testsite/www/smarty/smarty/libs/plugins/modifier.escape.php'; ?>/*/%%SmartyNocache:39826525151792530f244f3-81016701%%*/
Fatal error: Call to undefined function smarty_modifier_escape() in /sites/testsite/www/smarty/smarty/demo/templates_c/ff2566969a4e56eb6e9c8584f1ee068c63a89b5d.file.bug.tpl.php on line 29 |
5. My conclusion: it's a bug. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Apr 25, 2013 3:23 pm Post subject: |
|
|
The fix is now in the SVN trunk and will later be included in 3.1.14
The escape modifier could compile into wrong code when used in {nocache} sections but caching was not enabled. |
|
Back to top |
|
tpanula Smarty Rookie
Joined: 19 May 2003 Posts: 6
|
Posted: Fri Apr 26, 2013 6:17 am Post subject: |
|
|
U.Tews wrote: | The fix is now in the SVN trunk and will later be included in 3.1.14
The escape modifier could compile into wrong code when used in {nocache} sections but caching was not enabled. |
Thanks for the quick response! Seems to be working fine! |
|
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
|