strange errors...
| From: | Rasmus Schultz | Date: | Thu, 27 Feb 2003 14:50:07 +0000 |
| Subject: | strange errors... | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8254@lists.php.net to get a copy of this message | ||
Every now and then, for no apparent reason, I get this error:
/httpdocs/Smarty.class.php, line 1567
ERROR(2)
Invalid argument supplied for foreach()
I use an error handler for E_ERROR | E_WARNING | E_NOTICE, which
emails the technical error message (file, line number, error message)
to me, and gives the user a nice apology message instead ... and my
only thought is to extend this, so that it includes information
about which template file was loaded at the time of the error.
I've used the same error handler om many sites in the past, and it's
always worked well, but with Smarty I sometimes get error messages
like these, thta don't tell me which of my PHP scripts or templates
were associated with the error.
So my question basically is: how do I get the filename of the last
loaded template from the $smarty object?