Smarty 2.2.0 - bug with debug.tpl using Windows
| From: | Ferdinand Beyer | Date: | Mon, 05 Aug 2002 09:13:14 +0000 |
| Subject: | Smarty 2.2.0 - bug with debug.tpl using Windows | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5584@lists.php.net to get a copy of this message | ||
Hi,
I don't know if this was already mentioned. I have just downloaded
the latest Smarty release and run the example page when I
encountered the bug.
It only appears with debugging enabled and a windows platform. The
result is a famous "Call to undefined function: ()" fatal error:
Fatal error: Call to undefined function: () in
f:\webroot\test\smarty\smarty-2.2.0\Smarty.class.php on line 999
The problem is that smarty sets $debug_tpl to an absolut file name
in the smarty constructor:
$this->debug_tpl = SMARTY_DIR.'debug.tpl';
In Windows environment, this is of course something like
"c:/apache/htdocs/smarty/debug.tpl". Smarty then tries to load a
resource plugin for 'c:'.
So please update smarty's constructor to use the 'file:' resource:
$this->debug_tpl = 'file:'.SMARTY_DIR.'debug.tpl';
I was also very confused that there was no smarty error triggered - it
simply tried to call an undefined function from the $_plugins array;
neither _parse_file_path() nor _fetch_template_info() try to load a
resource plugin nor check whether a resource plugin was loaded.
--
Ferdinand Beyer
<fbeyer@clickhand.de>
--
Ferdinand Beyer
<fbeyer@clickhand.de>