AW: [SMARTY] Smarty caching problem

From: Date: Tue, 13 Aug 2002 16:41:18 +0000
Subject: AW: [SMARTY] Smarty caching problem
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5686@lists.php.net to get a copy of this message
> > > the error i get is: > > > fopen("D:/www/Smarty-2.3.0/cache/\standard.tpl", "r") - No > such file or > > > directory > > > > i think i found the reason. Smarty.class.php lines 1401ff looks > like this: > > > > if (!($fd = @fopen($filename, 'r'))) { > > return false; > > } > > checking for the file's existence isn't that hard. make that > if (!file_exists($filename) || !($fd = @fopen($filename, 'r'))) { > thanks very much roman, this works! but i found another possibility t get it to work without modifing smarty: the custom error handler must not exit, if the error was triggered by a @-signed function. this can be accomplished by checking the return code of error_reporting(). if this is 0 it was a @-signed function. perhaps a notice about custom error handlers should be in the caching-section of the manual, because it costed me serveral hours (although your excelent help) to find and eliminate the problem. thanks, rainer

« previous php.smarty.general (#5686) next »