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);
        if (!function_exists($fun)) throw new PHPTAL_Exception(...);
        $fun( $this, $this->_context );

It's not a bug, it's a feature ;)
This code fragment is for macros defined in the same file as their caller, so there should be no need to load the file again.

If it doesn't work for you, could you send me an example template that exposes the bug?

regards, Kornel

PHPTAL mailing list

Reply via email to