Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

can't use clone in an assignment expression

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
ctlajoie
Smarty Rookie


Joined: 20 Nov 2009
Posts: 29

PostPosted: Thu Jan 21, 2010 3:49 am    Post subject: can't use clone in an assignment expression Reply with quote

Clone can't be used in an assignment expression like this:
Code:
{$dt = clone($somedate)}

I get this error:
Quote:
unknown function "clone" in C:\(a path)\smarty3\sysplugins\smarty_internal_templatecompilerbase.php on line 398

likely because clone is a language construct and not a function. This would however be useful. I want to clone a DateTime object and use it in a loop, incrementing the variable with {$dt = $dt->modify('+15 mins')}
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 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