|
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 |
sstrange Smarty n00b
Joined: 14 Aug 2013 Posts: 2
|
Posted: Wed Aug 14, 2013 6:17 am Post subject: Possible timestamp bug in two smarty files |
|
|
In smarty_internal_config.php line 183 (function compileConfigSource) and smarty_internal_template.php line 181 (function compileTemplateSource), $saved_timestamp ='s rather than =='s in the if() statement. $saved_timestamp appears not be defined anywhere. Is this code correct as it generates an error on my website: TEXT: Undefined variable: saved_timestamp? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Aug 14, 2013 1:34 pm Post subject: |
|
|
It is valid, and it is defined right where it is set:
Code: | if ($saved_timestamp = $this->getCompiledTimestamp()) { |
It is not checking for equality, it is checking if the value was false or not. I'm not sure how this would create an undefined variable error? If you do this in PHP:
Does $b throw an undefined var error? |
|
Back to top |
|
sstrange Smarty n00b
Joined: 14 Aug 2013 Posts: 2
|
Posted: Wed Aug 14, 2013 9:35 pm Post subject: |
|
|
Many thanks for the clarification and I agree with your comments, no error should be generated. I will monitor the situation and see what happens. You should probably close this thread for now. |
|
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
|