From 3bb22560c00ab6a0648c0f6308c3dfa900994c19 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Sun, 14 Jun 2015 04:26:37 +0200 Subject: [PATCH] - bugfix an output tag with variable, modifier followed by an operator like {$foo|modifier+1} did fail https://github.com/smarty-php/smarty/issues/53 --- lexer/smarty_internal_templateparser.y | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lexer/smarty_internal_templateparser.y b/lexer/smarty_internal_templateparser.y index 341c99f8..fef849e4 100644 --- a/lexer/smarty_internal_templateparser.y +++ b/lexer/smarty_internal_templateparser.y @@ -334,26 +334,18 @@ tag(res) ::= LDEL variable(e). { res = $this->compiler->compileTag('private_print_expression',array(),array('value'=>e)); } -tag(res) ::= LDEL variable(e) modifierlist(l) attributes(a). { - res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e, 'modifierlist'=>l)); -} - tag(res) ::= LDEL variable(e) attributes(a). { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e)); } tag(res) ::= LDEL value(e). { res = $this->compiler->compileTag('private_print_expression',array(),array('value'=>e)); } -tag(res) ::= LDEL value(e) modifierlist(l) attributes(a). { - res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e, 'modifierlist'=>l)); -} - tag(res) ::= LDEL value(e) attributes(a). { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e)); } -tag(res) ::= LDEL expr(e) modifierlist(l) attributes(a). { - res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e,'modifierlist'=>l)); +tag(res) ::= LDEL expr(e). { + res = $this->compiler->compileTag('private_print_expression',array(),array('value'=>e)); } tag(res) ::= LDEL expr(e) attributes(a). {