Re: [SMARTY] Smarty caching problem
| From: | Roman Neuhauser | Date: | Tue, 13 Aug 2002 16:32:41 +0000 |
| Subject: | Re: [SMARTY] Smarty caching problem | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5685@lists.php.net to get a copy of this message | ||
> From: "Rainer Collet" <rain_c1@web.de>
> To: "Smarty General" <smarty-general@lists.php.net>
> Date: Tue, 13 Aug 2002 18:23:40 +0200
> Subject: AW: [SMARTY] Smarty caching problem
>
> > 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;
> }
>
> but instead of return false, because a cache-file never was created, an
> error is triggered. the "@" is ignored, because i defined a custom error
> handler. but i need this error handler. i don't know how to get it to work
> without ignoring E_WARNINGS in my custom error handler,
checking for the file's existence isn't that hard. make that
if (!file_exists($filename) || !($fd = @fopen($filename, 'r'))) {
which is not wanted,
> because of many other E_WARNINGS i want to trigger.
--
FreeBSD 4.6-STABLE
6:30PM up 4 days, 6:25, 15 users, load averages: 0.04, 0.09, 0.08