Forums / Developer / Possible bug in eztemplatecompiler.php

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Possible bug in eztemplatecompiler.php

Author Message

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

John Strandmyr

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