|
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 |
ctlajoie Smarty Rookie
Joined: 20 Nov 2009 Posts: 29
|
Posted: Thu Jan 21, 2010 3:49 am Post subject: can't use clone in an assignment expression |
|
|
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 |
|
|
|
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
|