From c9cd39f36f3921a186e9f140733edc22f8e4201f Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Sat, 23 May 2015 23:40:02 +0200 Subject: [PATCH] minor bugfix when processing autoliteral { php} tag. Does not effect generated output. --- lexer/smarty_internal_templatelexer.plex | 1 - libs/sysplugins/smarty_internal_compile_private_php.php | 1 + libs/sysplugins/smarty_internal_templatelexer.php | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index bd9b7a94..56b7b8db 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -328,7 +328,6 @@ class Smarty_Internal_Templatelexer phpstart { $obj = new Smarty_Internal_Compile_Private_Php(); $obj->parsePhp($this); - $this->token = Smarty_Internal_Templateparser::TP_PHP; } ldel literal rdel { if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { diff --git a/libs/sysplugins/smarty_internal_compile_private_php.php b/libs/sysplugins/smarty_internal_compile_private_php.php index 0a3a29c1..15cf5182 100644 --- a/libs/sysplugins/smarty_internal_compile_private_php.php +++ b/libs/sysplugins/smarty_internal_compile_private_php.php @@ -101,6 +101,7 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase */ public function parsePhp($lex) { + $lex->token = Smarty_Internal_Templateparser::TP_PHP; $close = 0; $lex->taglineno = $lex->line; $closeTag = '?>'; diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index 9b0ade35..8fb21ab2 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -340,7 +340,6 @@ class Smarty_Internal_Templatelexer $obj = new Smarty_Internal_Compile_Private_Php(); $obj->parsePhp($this); - $this->token = Smarty_Internal_Templateparser::TP_PHP; } function yy_r1_15()