crodas / Haanga

Template compiler for PHP, Django-style (as much as possible). Pretty efficent by avoiding to have anything at run-time.
http://haanga.org/
Other
136 stars 28 forks source link

php 5.2.17: Only variables should be passed by reference #8

Closed pct closed 12 years ago

pct commented 12 years ago

Hello,

When I use Haanga on php 5.2.17 at some web hosting server, that cause:

Message: Only variables should be passed by reference File: Haanga/lib/Haanga/Compiler/Parser.php Line: 2000

Could you help to fix it? Thanks!

pct commented 12 years ago

Hi, I found the solution by myself.

just change line 2000: function yy_r78(){ $this->_retvalue = current($this->compiler->generate_variable_name($this->yystack[$this->yyidx + 0]->minor, false)); }

to: function yy_r78(){ $var = $this->compiler->generate_variable_name($this->yystack[$this->yyidx + 0]->minor, false); $this->_retvalue = current($var); }

crodas commented 12 years ago

Just replied to your merge request. I would recommend you to upgrade since future versions of Haanga will work only for php5.3.x+