|
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 |
Dice Smarty Rookie
Joined: 11 May 2010 Posts: 14
|
Posted: Fri Jun 15, 2012 1:50 pm Post subject: filemtime() error at smarty_resource.php on line 352 |
|
|
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 |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Fri Jun 15, 2012 2:38 pm Post subject: |
|
|
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 |
|
Dice Smarty Rookie
Joined: 11 May 2010 Posts: 14
|
Posted: Fri Jun 15, 2012 2:54 pm Post subject: |
|
|
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 |
|
|
|
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
|