From e0fc310b6e52d2246cf07fd800ac4a70252bc6c3 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 25 Nov 2015 21:19:23 +0100 Subject: [PATCH] -bugfix a left delimter like '[%' did fail on [%$var_[%$variable%]%] (forum topic 25798) --- change_log.txt | 3 + lexer/smarty_internal_templatelexer.plex | 18 +- .../smarty_internal_templatelexer.php | 189 +++++++++--------- 3 files changed, 106 insertions(+), 104 deletions(-) diff --git a/change_log.txt b/change_log.txt index 5488c230..7e2b61dd 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.28-dev===== (xx.xx.2015) + 25.11.2015 + -bugfix a left delimter like '[%' did fail on [%$var_[%$variable%]%] (forum topic 25798) + 02.11.2015 - bugfix {include} with variable file name like {include file="foo_`$bar`.tpl"} did fail in 3.1.28-dev https://github.com/smarty-php/smarty/issues/102 diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index cc05297e..721b528c 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -436,7 +436,15 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } - double_quote { + ldel { + if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } else { + $this->yypushstate(self::TAG); + return true; + } + } + double_quote { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); } @@ -569,14 +577,6 @@ class Smarty_Internal_Templatelexer space { $this->token = Smarty_Internal_Templateparser::TP_SPACE; } - ldel { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } else { - $this->yypushstate(self::TAG); - return true; - } - } text { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index c0843625..993b7be6 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -205,7 +205,7 @@ class Smarty_Internal_Templatelexer $this->data = $data; $this->counter = 0; if (preg_match('~^\xEF\xBB\xBF~i', $this->data, $match)) { - $this->counter += strlen($match[0]); + $this->counter += strlen($match[ 0 ]); } $this->line = 1; $this->smarty = $compiler->smarty; @@ -214,8 +214,8 @@ class Smarty_Internal_Templatelexer $this->ldel_length = strlen($this->smarty->left_delimiter); $this->rdel = preg_quote($this->smarty->right_delimiter, '~'); $this->rdel_length = strlen($this->smarty->right_delimiter); - $this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter; - $this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter; + $this->smarty_token_names[ 'LDEL' ] = $this->smarty->left_delimiter; + $this->smarty_token_names[ 'RDEL' ] = $this->smarty->right_delimiter; } public function PrintTrace() @@ -229,8 +229,8 @@ class Smarty_Internal_Templatelexer */ public function isAutoLiteral() { - return $this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? - strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false; + return $this->smarty->auto_literal && isset($this->value[ $this->ldel_length ]) ? + strpos(" \n\t\r", $this->value[ $this->ldel_length ]) !== false : false; } private $_yy_state = 1; @@ -246,14 +246,14 @@ class Smarty_Internal_Templatelexer { if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%sState push %s\n", $this->yyTracePrompt, - isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, - isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } @@ -262,13 +262,13 @@ class Smarty_Internal_Templatelexer { if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%sState pop %s\n", $this->yyTracePrompt, - isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } $this->_yy_state = array_pop($this->_yy_stack); if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, - isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } @@ -278,7 +278,7 @@ class Smarty_Internal_Templatelexer $this->_yy_state = $state; if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%sState set %s\n", $this->yyTracePrompt, - isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } @@ -299,7 +299,7 @@ class Smarty_Internal_Templatelexer do { if (preg_match($this->yy_global_pattern1, $this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { + if (strlen($yysubmatches[ 0 ]) < 200) { $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); } else { $yymatches = array_filter($yymatches, 'strlen'); @@ -331,7 +331,7 @@ class Smarty_Internal_Templatelexer continue; } } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); + throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]); } break; } while (true); @@ -349,8 +349,8 @@ class Smarty_Internal_Templatelexer { preg_match("~[*]{$this->rdel}~", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); - if (isset($match[0][1])) { - $to = $match[0][1] + strlen($match[0][0]); + if (isset($match[ 0 ][ 1 ])) { + $to = $match[ 0 ][ 1 ] + strlen($match[ 0 ][ 0 ]); } else { $this->compiler->trigger_template_error("missing or misspelled comment closing tag '*{$this->smarty->right_delimiter}'"); } @@ -368,8 +368,8 @@ class Smarty_Internal_Templatelexer function yy_r1_7() { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? - strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false + if ($this->smarty->auto_literal && isset($this->value[ $this->ldel_length ]) ? + strpos(" \n\t\r", $this->value[ $this->ldel_length ]) !== false : false ) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { @@ -381,8 +381,8 @@ class Smarty_Internal_Templatelexer function yy_r1_8() { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? - strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false + if ($this->smarty->auto_literal && isset($this->value[ $this->ldel_length ]) ? + strpos(" \n\t\r", $this->value[ $this->ldel_length ]) !== false : false ) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { @@ -410,8 +410,8 @@ class Smarty_Internal_Templatelexer $to = strlen($this->data); preg_match("~($this->ldel)|(<[?]((php\s+|=)|\s+))|(<[%])|(<[?]xml\s+)|()|([?][>])|([%][>])~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); - if (isset($match[0][1])) { - $to = $match[0][1]; + if (isset($match[ 0 ][ 1 ])) { + $to = $match[ 0 ][ 1 ]; } $this->value = substr($this->data, $this->counter, $to - $this->counter); $this->token = Smarty_Internal_Templateparser::TP_TEXT; @@ -435,7 +435,7 @@ class Smarty_Internal_Templatelexer do { if (preg_match($this->yy_global_pattern2, $this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { + if (strlen($yysubmatches[ 0 ]) < 200) { $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); } else { $yymatches = array_filter($yymatches, 'strlen'); @@ -467,7 +467,7 @@ class Smarty_Internal_Templatelexer continue; } } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); + throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]); } break; } while (true); @@ -526,7 +526,7 @@ class Smarty_Internal_Templatelexer function yy_r2_9() { - if ($this->_yy_stack[count($this->_yy_stack) - 1] == self::TEXT) { + if ($this->_yy_stack[ count($this->_yy_stack) - 1 ] == self::TEXT) { $this->yypopstate(); $this->token = Smarty_Internal_Templateparser::TP_SIMPELOUTPUT; $this->taglineno = $this->line; @@ -557,9 +557,8 @@ class Smarty_Internal_Templatelexer public function yylex3() { if (!isset($this->yy_global_pattern3)) { - $this->yy_global_pattern3 = "/\G(\\s*" . $this->rdel . - ")|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\\s+(not\\s+)?(odd|even|div)\\s+by))\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G(" . - $this->ldel . "\\s*)|\G([\S\s])/isS"; + $this->yy_global_pattern3 = "/\G(\\s*" . $this->rdel . ")|\G(" . $this->ldel . + "\\s*)|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\\s+(not\\s+)?(odd|even|div)\\s+by))\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G([\S\s])/isS"; } if ($this->counter >= strlen($this->data)) { return false; // end of input @@ -568,7 +567,7 @@ class Smarty_Internal_Templatelexer do { if (preg_match($this->yy_global_pattern3, $this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { + if (strlen($yysubmatches[ 0 ]) < 200) { $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); } else { $yymatches = array_filter($yymatches, 'strlen'); @@ -600,7 +599,7 @@ class Smarty_Internal_Templatelexer continue; } } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); + throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]); } break; } while (true); @@ -618,168 +617,181 @@ class Smarty_Internal_Templatelexer function yy_r3_2() { - $this->token = Smarty_Internal_Templateparser::TP_QUOTE; - $this->yypushstate(self::DOUBLEQUOTEDSTRING); + if ($this->smarty->auto_literal && isset($this->value[ $this->ldel_length ]) ? + strpos(" \n\t\r", $this->value[ $this->ldel_length ]) !== false : false + ) { + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } else { + $this->yypushstate(self::TAG); + return true; + } } function yy_r3_3() { - $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; + $this->token = Smarty_Internal_Templateparser::TP_QUOTE; + $this->yypushstate(self::DOUBLEQUOTEDSTRING); } function yy_r3_4() + { + + $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; + } + + function yy_r3_5() { $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILDPARENT; $this->taglineno = $this->line; } - function yy_r3_6() + function yy_r3_7() { $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; } - function yy_r3_7() + function yy_r3_8() { $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; } - function yy_r3_8() + function yy_r3_9() { $this->token = Smarty_Internal_Templateparser::TP_ISIN; } - function yy_r3_9() + function yy_r3_10() { $this->token = Smarty_Internal_Templateparser::TP_AS; } - function yy_r3_10() + function yy_r3_11() { $this->token = Smarty_Internal_Templateparser::TP_TO; } - function yy_r3_11() + function yy_r3_12() { $this->token = Smarty_Internal_Templateparser::TP_STEP; } - function yy_r3_12() + function yy_r3_13() { $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; } - function yy_r3_13() + function yy_r3_14() { $this->token = Smarty_Internal_Templateparser::TP_LOGOP; } - function yy_r3_18() + function yy_r3_19() { $this->token = Smarty_Internal_Templateparser::TP_TLOGOP; } - function yy_r3_23() + function yy_r3_24() { $this->token = Smarty_Internal_Templateparser::TP_SINGLECOND; } - function yy_r3_26() + function yy_r3_27() { $this->token = Smarty_Internal_Templateparser::TP_NOT; } - function yy_r3_29() + function yy_r3_30() { $this->token = Smarty_Internal_Templateparser::TP_TYPECAST; } - function yy_r3_33() + function yy_r3_34() { $this->token = Smarty_Internal_Templateparser::TP_OPENP; } - function yy_r3_34() + function yy_r3_35() { $this->token = Smarty_Internal_Templateparser::TP_CLOSEP; } - function yy_r3_35() + function yy_r3_36() { $this->token = Smarty_Internal_Templateparser::TP_OPENB; } - function yy_r3_36() + function yy_r3_37() { $this->token = Smarty_Internal_Templateparser::TP_CLOSEB; } - function yy_r3_37() + function yy_r3_38() { $this->token = Smarty_Internal_Templateparser::TP_PTR; } - function yy_r3_38() + function yy_r3_39() { $this->token = Smarty_Internal_Templateparser::TP_APTR; } - function yy_r3_39() + function yy_r3_40() { $this->token = Smarty_Internal_Templateparser::TP_EQUAL; } - function yy_r3_40() + function yy_r3_41() { $this->token = Smarty_Internal_Templateparser::TP_INCDEC; } - function yy_r3_42() + function yy_r3_43() { $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; } - function yy_r3_44() + function yy_r3_45() { $this->token = Smarty_Internal_Templateparser::TP_MATH; } - function yy_r3_46() + function yy_r3_47() { $this->token = Smarty_Internal_Templateparser::TP_AT; } - function yy_r3_47() + function yy_r3_48() { $this->token = Smarty_Internal_Templateparser::TP_HATCH; } - function yy_r3_48() + function yy_r3_49() { // resolve conflicts with shorttag and right_delimiter starting with '=' @@ -787,103 +799,90 @@ class Smarty_Internal_Templatelexer $this->smarty->right_delimiter ) { preg_match("~\s+~", $this->value, $match); - $this->value = $match[0]; + $this->value = $match[ 0 ]; $this->token = Smarty_Internal_Templateparser::TP_SPACE; } else { $this->token = Smarty_Internal_Templateparser::TP_ATTR; } } - function yy_r3_49() + function yy_r3_50() { $this->token = Smarty_Internal_Templateparser::TP_NAMESPACE; } - function yy_r3_52() + function yy_r3_53() { $this->token = Smarty_Internal_Templateparser::TP_ID; } - function yy_r3_53() + function yy_r3_54() { $this->token = Smarty_Internal_Templateparser::TP_INTEGER; } - function yy_r3_54() + function yy_r3_55() { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->yypopstate(); } - function yy_r3_55() + function yy_r3_56() { $this->token = Smarty_Internal_Templateparser::TP_VERT; } - function yy_r3_56() + function yy_r3_57() { $this->token = Smarty_Internal_Templateparser::TP_DOT; } - function yy_r3_57() + function yy_r3_58() { $this->token = Smarty_Internal_Templateparser::TP_COMMA; } - function yy_r3_58() + function yy_r3_59() { $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; } - function yy_r3_59() + function yy_r3_60() { $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; } - function yy_r3_60() + function yy_r3_61() { $this->token = Smarty_Internal_Templateparser::TP_COLON; } - function yy_r3_61() + function yy_r3_62() { $this->token = Smarty_Internal_Templateparser::TP_QMARK; } - function yy_r3_62() + function yy_r3_63() { $this->token = Smarty_Internal_Templateparser::TP_HEX; } - function yy_r3_63() - { - - $this->token = Smarty_Internal_Templateparser::TP_SPACE; - } - function yy_r3_64() { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? - strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } else { - $this->yypushstate(self::TAG); - return true; - } + $this->token = Smarty_Internal_Templateparser::TP_SPACE; } function yy_r3_65() @@ -906,7 +905,7 @@ class Smarty_Internal_Templatelexer do { if (preg_match($this->yy_global_pattern4, $this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { + if (strlen($yysubmatches[ 0 ]) < 200) { $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); } else { $yymatches = array_filter($yymatches, 'strlen'); @@ -938,7 +937,7 @@ class Smarty_Internal_Templatelexer continue; } } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); + throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]); } break; } while (true); @@ -971,8 +970,8 @@ class Smarty_Internal_Templatelexer $to = strlen($this->data); preg_match("~{$this->ldel}[/]?literal{$this->rdel}~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); - if (isset($match[0][1])) { - $to = $match[0][1]; + if (isset($match[ 0 ][ 1 ])) { + $to = $match[ 0 ][ 1 ]; } else { $this->compiler->trigger_template_error("missing or misspelled literal closing tag"); } @@ -997,7 +996,7 @@ class Smarty_Internal_Templatelexer do { if (preg_match($this->yy_global_pattern5, $this->data, $yymatches, null, $this->counter)) { $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { + if (strlen($yysubmatches[ 0 ]) < 200) { $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); } else { $yymatches = array_filter($yymatches, 'strlen'); @@ -1029,7 +1028,7 @@ class Smarty_Internal_Templatelexer continue; } } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); + throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]); } break; } while (true); @@ -1052,8 +1051,8 @@ class Smarty_Internal_Templatelexer function yy_r5_3() { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? - strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false + if ($this->smarty->auto_literal && isset($this->value[ $this->ldel_length ]) ? + strpos(" \n\t\r", $this->value[ $this->ldel_length ]) !== false : false ) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { @@ -1065,8 +1064,8 @@ class Smarty_Internal_Templatelexer function yy_r5_4() { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? - strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false + if ($this->smarty->auto_literal && isset($this->value[ $this->ldel_length ]) ? + strpos(" \n\t\r", $this->value[ $this->ldel_length ]) !== false : false ) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else { @@ -1078,8 +1077,8 @@ class Smarty_Internal_Templatelexer function yy_r5_5() { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? - strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false + if ($this->smarty->auto_literal && isset($this->value[ $this->ldel_length ]) ? + strpos(" \n\t\r", $this->value[ $this->ldel_length ]) !== false : false ) { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } else {