Re: [SMARTY] The dreaded 'Fatal error: Call to undefined function: ()' error
| From: | Tim Fountain | Date: | Tue, 30 Jul 2002 23:46:24 +0000 |
| Subject: | Re: [SMARTY] The dreaded 'Fatal error: Call to undefined function: ()' error | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5522@lists.php.net to get a copy of this message | ||
On Tuesday, July 30, 2002, Ferdinand Beyer wrote:
> On 30 Jul 2002 at 13:11, Tim Fountain wrote:
>> it would be useful if Smarty could be changed in future versions so
>> that if [the _get_plugins_filepath()] function returns false an
>> error message is displayed. At the moment Smarty just goes ahead
>> with processing anyway, and will then fall down when it comes
>> across some plugin-related code.
> I'm not sure on this. In my Smarty experience, it always toggles a
> warning if it cannot load a function. Check your error_reporting
> setup and make sure that it includes warnings (e.g. E_ALL ^
> E_NOTICE).
The error settings on my development server are E_ALL.
> But you're right: Smarty should suppress a undefined-function fatal
> error - ie. by checking if a plugin is loaded before calling it in
> the compiled template.
That's not exactly what I was saying - I was saying Smarty should
display an error if it fails to load a plugin, to prevent the cryptic
error that may occur later when an undefined plugin is called.
On the other hand, your templates may not use the plugin at all so not
being able to load it wouldn't be a problem. It's a tricky one.
--
Tim Fountain (tim@tfountain.co.uk)
http://www.tfountain.co.uk/