Latte variable increment ends with Parse Error, Nette 2.2.2

ajda2
Member | 49
+
0
-

Hi, I have found issue when I have tried increment variable in latte template.
If a do this in template

<?php
{var $i = 0}
{var $i++}
?>

It will ends with Parse Error: syntax error, unexpected ‘=’

Incrementing like this in Nette > 2.1 worsk fine.

Here is template file
https://dl.dropboxusercontent.com/…efault.latte
And here is Tracy output
https://dl.dropboxusercontent.com/…%20Error.htm

David Matějka
Moderator | 5912
+
+1
-

Comments

ajda2:

@matej21: Thanks, I didn't see that. My bad.
But is this really happening? It will break lots of templates.

5 years ago