|
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 |
gencer Smarty Rookie
Joined: 03 Dec 2011 Posts: 5
|
Posted: Sun Feb 12, 2012 1:54 pm Post subject: [3.1.7] - Smarty UNLINK Error |
|
|
What i trying to do:
If i refresh my page and if cache folder is empty/clean, smarty tries to cache my tpl file. Thats OK. But, as i said its empty so smarty trying to unlink/remove file.
Expected:
Silent mode. Unlink file. If file exist remove it, if not just pass it.
Result/Given:
Exceptional Fatal Error :
unlink(/var/www/mzphp/cache/tpl/97ab51404910e166e4dcfd063979b57f60186fa5.file.TplAds.tpl.php): No such file or directory on smarty_internal_write_file.php [49]
Solution:
Yes. Unlink method is silent. I see @ operator. BUT you change error_reporting on the top of this function.
Code: | $_error_reporting = error_reporting();
error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING); |
Just comment in this lines and issue resolved.
So, do you have another solution for this or mine is enough to work it out?
Thanks,
Gencer. |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Mon Feb 13, 2012 9:53 am Post subject: |
|
|
You're obviously working with a custom error_handler. Please see muteExpectedErrors() There's an explanation of this in the code _________________ Twitter |
|
Back to top |
|
gencer Smarty Rookie
Joined: 03 Dec 2011 Posts: 5
|
Posted: Wed Feb 15, 2012 3:35 pm Post subject: |
|
|
rodneyrehm wrote: | You're obviously working with a custom error_handler. Please see muteExpectedErrors() There's an explanation of this in the code |
Indeed I am. Thats worked for me. Thanks! |
|
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
|