Re: [SMARTY] Re: I found a BUG in Smarty!

From: Date: Thu, 16 May 2002 13:47:20 +0000
Subject: Re: [SMARTY] Re: I found a BUG in Smarty!
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4229@lists.php.net to get a copy of this message
On 16 maja 2002 at 15:36:27 Ivo Jansch <ivo@ibuildings.nl> wrote: >> But can you show me any working example of posibly errors when you >> change those 2 lines from include_once() to include()? > Yeah. Put this inside your test.php: > function test() > { > } > Your patch will fail with a 'already defined' error message. You have right... It does not work for defined function or classes. Otherwise it should work. There are cons and pros. If you have include_once statement than nested templates cannot put their external files for their php code. But if you have include statement than defined classes (or functions) will not work and code will fail. So... maybe, the best solution is to add an optional parameter to {include_php} as it was mentioned. (It would be good to add small info about such possibly problems with nested templates to manual as well). -- Johann

« previous php.smarty.general (#4229) next »