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

filemtime() error at smarty_resource.php on line 352

 
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 -> General
View previous topic :: View next topic  
Author Message
Dice
Smarty Rookie


Joined: 11 May 2010
Posts: 14

PostPosted: Fri Jun 15, 2012 1:50 pm    Post subject: filemtime() error at smarty_resource.php on line 352 Reply with quote

Hi all,

So i am currently getting the following error because a templates in my directory does not exist.

This is because i use a fallback method along with a custom error handler.

My template fallback method:
Code:

    $template_locations = array(
        '/templates/test_skin/template/',
        '/templates/default/template/'
    );
   
    $smarty->template_dir = $template_locations;


My system is designed like this so test_skin might only have css changes and not require template changes so it will revert back to the templates inside default.

How would i go about supressing the errors on filemtime for this method to work. I know not putting a file_exists call there saves 50% on disk i/o's but im really considering if its worth it since im loosing that value as it keeps opening and writing into my error log on each warning.

Another thing is I don't want these errors in my error log. So is there any way to do this without altering the smarty source?
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Fri Jun 15, 2012 2:38 pm    Post subject: Reply with quote

Call Smarty::muteExpectedErrors() after you've registered your custom error handler. It will filter errors smarty expects to see and pass everything else to your handler.
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
Dice
Smarty Rookie


Joined: 11 May 2010
Posts: 14

PostPosted: Fri Jun 15, 2012 2:54 pm    Post subject: Reply with quote

rodneyrehm wrote:
Call Smarty::muteExpectedErrors() after you've registered your custom error handler. It will filter errors smarty expects to see and pass everything else to your handler.
Thanks worked well.
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 -> General 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