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

[3.1.7] - Smarty UNLINK Error

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


Joined: 03 Dec 2011
Posts: 5

PostPosted: Sun Feb 12, 2012 1:54 pm    Post subject: [3.1.7] - Smarty UNLINK Error Reply with quote

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
View user's profile Send private message
rodneyrehm
Administrator


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

PostPosted: Mon Feb 13, 2012 9:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
gencer
Smarty Rookie


Joined: 03 Dec 2011
Posts: 5

PostPosted: Wed Feb 15, 2012 3:35 pm    Post subject: Reply with quote

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
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 -> Bugs 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