Re: [PHPTAL] Bug when popping context

2012-05-09 Thread Kornel Lesiński
On Wed, 09 May 2012 13:32:28 +0100, Pierre-Olivier Vares wrote: I dropped this piece of code - I never use tal:define and metal:fill-slot in the same time. But has anybody an idea of a proper solution, correcting the 2 bugs ? Yeah, it's a tricky piece of code. I've been going back and fo

Re: [PHPTAL] Bug: dot replaced to -> also in php: strings

2009-03-21 Thread Kornel Lesiński
On 20.03.2009, at 20:23, Szymek Przybył wrote: I find some bug in phptal, i have such as input: In XML you can't escape quotes with backslash. You're supposed to use " for this. The bug here is not in replacing of dots, but in the fact that PHPTAL has accepted invalid XML. Another th

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-19 Thread Kornel Lesiński
On 19-11-2008 at 04:31:07 romtek <[EMAIL PROTECTED]> wrote: Please elaborate on this. Particularly, I don't know what an anonymous "" is. Perhaps, a short example would be helpful. If you use $phptal->setSource("error!"), PHPTAL will report that you've got error in " XXX" line 1, and won't t

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-18 Thread romtek
On Tue, Nov 18, 2008 at 4:11 AM, Kornel Lesiński <[EMAIL PROTECTED] > wrote: > > What's the path parameter for? >> > > For example it's displayed in error messages instead of anonymous > "". Please elaborate on this. Particularly, I don't know what an anonymous "" is. Perhaps, a short example

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-18 Thread Kornel Lesiński
On 18-11-2008 at 06:12:18 romtek <[EMAIL PROTECTED]> wrote: I'd like to understand the purpose of this method. Is it to initialize a template object with a template in memory, not in file? Yes. What's the path parameter for? For example it's displayed in error messages instead of anonymous

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-17 Thread romtek
On Mon, Nov 17, 2008 at 4:18 AM, Kornel Lesiński <[EMAIL PROTECTED] > wrote: > On 16-11-2008 at 08:24:11 Dave Looker <[EMAIL PROTECTED]> wrote: > > I needed to generate several templates all using the same set of data so >> I populated a single template and then reset the template before each >

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-17 Thread Kornel Lesiński
On 16-11-2008 at 08:24:11 Dave Looker <[EMAIL PROTECTED]> wrote: I needed to generate several templates all using the same set of data so I populated a single template and then reset the template before each execute. However using setSource() to load a template instead of setTemplate()

Re: [PHPTAL] bug with condition

2008-09-11 Thread Kornel Lesiński
On 11-09-2008 at 04:20:11 zou guangxian <[EMAIL PROTECTED]> wrote: If the code is: [CODE] tal:condition="php: count(book)>0"> [/CODE] will generate [RESULT] pushContext() ; $ctx->book = phptal_path($ctx->relative, 'book', $ctx->__nothrow) ; if (count($ctx->book)>0): ; endif ; $ctx = $tpl->pop

RE: [PHPTAL] [bug]throw exception even if Context->__nothrow is true

2008-06-13 Thread zou guangxian
> If I remember well, there's a tal:on-error attribute to catch exceptions: > > http://phptal.motion-twin.com/manual/en/#tal-on-error > If I change play.html to [code] name age [/code] the output will be : [code] variables not defined here [/code] But I hope to get: [code] name [/c

Re: [PHPTAL] [bug]throw exception even if Context->__nothrow is true

2008-06-13 Thread Laurent Bedubourg
Kornel Lesinski wrote: On Thu, 12 Jun 2008 05:07:40 +0100, zou guangxian <[EMAIL PROTECTED]> wrote: After $tpl->getContext()->noThrow(true) was invoked Thanks for detailed report, but noThrow() isn't supposed to be used that way. getContext() method is only for use by macros and triggers a

Re: [PHPTAL] [bug]throw exception even if Context->__nothrow is true

2008-06-12 Thread Kornel Lesinski
On Thu, 12 Jun 2008 05:07:40 +0100, zou guangxian <[EMAIL PROTECTED]> wrote: After $tpl->getContext()->noThrow(true) was invoked Thanks for detailed report, but noThrow() isn't supposed to be used that way. getContext() method is only for use by macros and triggers and isn't supposed to

Re: [PHPTAL] bug?

2008-03-19 Thread Gosi
Hi Kornel, Kornel Lesinski schrieb: > On 18 Mar 2008, at 22:32, Gosi wrote: > >> i think there is a bug in PHPTAL.php at the executeMacro() method. >> >> the "require_once" at line 338 is missing. >> >> else { >> // call local macro >> require_once $this->getCodePath(); >> $fun = $thi

Re: [PHPTAL] bug?

2008-03-19 Thread Kornel Lesinski
On 18 Mar 2008, at 22:32, Gosi wrote: i think there is a bug in PHPTAL.php at the executeMacro() method. the "require_once" at line 338 is missing. else { // call local macro require_once $this->getCodePath(); $fun = $this->getFunctionName() . '_' . trim($path);

Re: [PHPTAL] Bug: PHP Warning if template hasn't been parsed yet

2008-01-29 Thread Kornel Lesinski
On 29 Jan 2008, at 13:33, [EMAIL PROTECTED] wrote: After upgrading to 1.1.10, I always get a PHP warning when a new template is being parsed. Warning: Invalid argument supplied for foreach() in /srv/www/httpd/ phost/d/de/pytalhost/diplomtrottel/web/Include/class.PHPTAL.php on line 378 T