Forums / Developer / Possible bug in eztemplatecompiler.php
John Strandmyr
Wednesday 14 October 2009 3:06:32 am
When i enable templateCompile, the usage of eztemplatecompiler.php in lib/ creates an error as it uses ezutils/classes/ezphpcreator.php's function thisVariableText which in turn creates an invalid phpstring like this one:
"Variable "valid_nodes" is already defined"
This results in a fatal PHP-error and displays no EZ-errormsg as the fatal error causes the whole script to die.
André R.
Wednesday 14 October 2009 5:44:38 am
What is the template code that triggers this?
I guess your referring to this code:
$php->addCodePiece( " \$tpl->warning( '" . eZTemplateDefFunction::DEF_FUNCTION_NAME . "', \"Variable $variableNameText is already defined.\", " . $php->thisVariableText( $variablePlacement ) . " );\n" );
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Wednesday 14 October 2009 7:45:41 am
Yes, that is correct. Thanks for adding that to the thread :-) I have also confirmed that the same code-snippet is in the newest stable release, 4.2.0