|
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 |
sbouber Smarty Rookie
Joined: 27 Jan 2004 Posts: 6
|
Posted: Mon Feb 02, 2004 12:09 pm Post subject: WARNING Error when cache does not exist |
|
|
hi everybody
i found that smarty (that i like a lot...) throws a warning error the first time a cache file is searched, and of course as it is not created yet, not found. With the default error handler, the error is discarded silently
with a custom error handler the error appears.
maybe it should not be like that, maybe i am wrong, that is a possibility...
but if i am right, that should not be an error not to find a cache file before it is created
******************************
ERRORTYPE => Warning
ERROR => 2
ERRORSTR => fopen(C:/Program files/Apache Group/Apache/htdocs/cachetries/cache\mlkj456\%%117\%%1172603085\index.tpl): failed to open stream: No such file or directory
ERRORFILE => C:\php\includes\smarty\Smarty.class.php
ERRORLINE => 1741
****************************** |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Feb 02, 2004 12:39 pm Post subject: |
|
|
you can catch errors that where silenced by the @-operator in your error_handler.
check it with something like:
Code: | if (error_reporting()==0) {
/* the error was inside an @-statement */
} else {
/* "regular" error */
} |
inside the error-handler. |
|
Back to top |
|
sbouber Smarty Rookie
Joined: 27 Jan 2004 Posts: 6
|
Posted: Mon Feb 02, 2004 12:56 pm Post subject: |
|
|
hi messju
it works, especially when doing nothing inside the @-part
that is cool programming
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
|