|
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 |
gizmore Smarty n00b
Joined: 11 Nov 2011 Posts: 1
|
Posted: Fri Nov 11, 2011 5:46 pm Post subject: NOTICE in smarty_resource.php line 679 |
|
|
There seems to be a NOTICE thrown if a template is not compiled yet.
The problem is in smarty_resource.php line 679 (filemtime)
Line 677-680
Code: |
$compiled = new Smarty_Template_Compiled($this);
$this->handler->populateCompiledFilepath($compiled, $_template);
$compiled->timestamp = @filemtime($compiled->filepath);
$compiled->exists = !!$compiled->timestamp;
|
I am currently using this fix:
Line 677-689
Code: |
$compiled = new Smarty_Template_Compiled($this);
$this->handler->populateCompiledFilepath($compiled, $_template);
if (is_file($compiled->filepath))
{
$compiled->timestamp = filemtime($compiled->filepath);
$compiled->exists = true;
}
else
{
$compiled->timestamp = false;
$compiled->exists = false;
}
|
Thank you for smarty and your time.
gizmore
EDIT:
I just read in a similar topic that custom error handlers should check if the error is supressed and the behaviour is intended for speed and security issues (race condition)
Sorry for wasting your time |
|
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
|