Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
{nocache}{$email|escape:"hexentity"}{/nocache} =&g

 
Post new topic   Reply to topic    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
tpanula
Smarty n00b


Joined: 19 May 2003
Posts: 3

PostPosted: Thu Apr 25, 2013 1:03 pm    Post subject: {nocache}{$email|escape:"hexentity"}{/nocache} =&g Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4656
Location: Hamburg / Germany

PostPosted: Thu Apr 25, 2013 3:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
tpanula
Smarty n00b


Joined: 19 May 2003
Posts: 3

PostPosted: Fri Apr 26, 2013 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Bugs 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