[smarty-php] r4893 committed - - bugfix change of 08.10.2014 could create E_NOTICE meassage when usi...

5 views
Skip to first unread message

smart...@googlecode.com

unread,
Oct 12, 2014, 11:10:10 AM10/12/14
to smart...@googlegroups.com
Revision: 4893
Author: Uwe....@googlemail.com
Date: Sun Oct 12 15:09:52 2014 UTC
Log: - bugfix change of 08.10.2014 could create E_NOTICE meassage
when using "<?php" tags

https://code.google.com/p/smarty-php/source/detail?r=4893

Modified:
/trunk/development/lexer/smarty_internal_templatelexer.php
/trunk/development/lexer/smarty_internal_templatelexer.plex
/trunk/development/lexer/smarty_internal_templateparser.php
/trunk/distribution/change_log.txt
/trunk/distribution/libs/sysplugins/smarty_internal_templatelexer.php
/trunk/distribution/libs/sysplugins/smarty_internal_templateparser.php

=======================================
--- /trunk/development/lexer/smarty_internal_templatelexer.php Sun Oct 12
14:11:34 2014 UTC
+++ /trunk/development/lexer/smarty_internal_templatelexer.php Sun Oct 12
15:09:52 2014 UTC
@@ -339,7 +339,7 @@
function yy_r1_14($yy_subpatterns)
{

- if (in_array($this->value, Array('<?', '<?=', '<?php')) || $script
= strpos($this->value, '<s') === 0) {
+ if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
@@ -1068,7 +1068,7 @@
function yy_r3_3($yy_subpatterns)
{

- if (in_array($this->value, Array('<?', '<?=', '<?php')) || $script
= strpos($this->value, '<s') === 0) {
+ if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
=======================================
--- /trunk/development/lexer/smarty_internal_templatelexer.plex Sun Oct 12
14:11:34 2014 UTC
+++ /trunk/development/lexer/smarty_internal_templatelexer.plex Sun Oct 12
15:09:52 2014 UTC
@@ -282,11 +282,11 @@
}
}
phpstarttag {
- if (in_array($this->value, Array('<?', '<?=', '<?php')) || $script
= strpos($this->value, '<s') === 0) {
- if ($script) {
+ if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if ($script) {
$this->is_phpScript = true;
- }
- $this->phpValue = $this->value;
+ }
+ $this->phpValue = $this->value;
$this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
} elseif ($this->value == '<?xml') {
$this->token = Smarty_Internal_Templateparser::TP_XMLTAG;
@@ -602,14 +602,14 @@
}
}
phpstarttag {
- if (in_array($this->value, Array('<?', '<?=', '<?php')) || $script
= strpos($this->value, '<s') === 0) {
- if ($script) {
- $this->is_phpScript = true;
- }
- $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if ($script) {
+ $this->is_phpScript = true;
+ }
+ $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
} else {
- $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;
- $this->value = substr($this->value, 0, 2);
+ $this->token =
Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;
+ $this->value = substr($this->value, 0, 2);
}
}
phpendtag {
=======================================
--- /trunk/development/lexer/smarty_internal_templateparser.php Sun Oct 12
14:11:34 2014 UTC
+++ /trunk/development/lexer/smarty_internal_templateparser.php Sun Oct 12
15:09:52 2014 UTC
@@ -4444,13 +4444,14 @@
while ($this->yyidx >= 0) {
$stack = $this->yy_pop_parser_stack();
}
- #line 76 "smarty_internal_templateparser.y"
+ #line 75 "smarty_internal_templateparser.y"

$this->successful = !$this->internalError;
$this->internalError = false;
$this->retvalue = $this->_retvalue;
//echo $this->retvalue."\n\n";
- #line 3165 "smarty_internal_templateparser.php"
+
+ #line 3166 "smarty_internal_templateparser.php"
}

public function doParse($yymajor, $yytokenvalue)
=======================================
--- /trunk/distribution/change_log.txt Sun Oct 12 14:11:34 2014 UTC
+++ /trunk/distribution/change_log.txt Sun Oct 12 15:09:52 2014 UTC
@@ -1,6 +1,7 @@
===== 3.1.21-dev ===== (xx.xx.2014)
12.10.2014
- bugfix a comment like "<script{*foo*} language=php>" bypassed
$php_handling checking (Thue Kristensen)
+ - bugfix change of 08.10.2014 could create E_NOTICE meassage when
using "<?php" tags

===== 3.1.20 ===== (09.10.2014)
08.10.2014
=======================================
--- /trunk/distribution/libs/sysplugins/smarty_internal_templatelexer.php
Sun Oct 12 14:11:34 2014 UTC
+++ /trunk/distribution/libs/sysplugins/smarty_internal_templatelexer.php
Sun Oct 12 15:09:52 2014 UTC
@@ -339,7 +339,7 @@
function yy_r1_14($yy_subpatterns)
{

- if (in_array($this->value, Array('<?', '<?=', '<?php')) || $script
= strpos($this->value, '<s') === 0) {
+ if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
@@ -1068,7 +1068,7 @@
function yy_r3_3($yy_subpatterns)
{

- if (in_array($this->value, Array('<?', '<?=', '<?php')) || $script
= strpos($this->value, '<s') === 0) {
+ if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
=======================================
--- /trunk/distribution/libs/sysplugins/smarty_internal_templateparser.php
Sun Oct 12 14:11:34 2014 UTC
+++ /trunk/distribution/libs/sysplugins/smarty_internal_templateparser.php
Sun Oct 12 15:09:52 2014 UTC
@@ -4444,13 +4444,14 @@
while ($this->yyidx >= 0) {
$stack = $this->yy_pop_parser_stack();
}
- #line 76 "smarty_internal_templateparser.y"
+ #line 75 "smarty_internal_templateparser.y"

$this->successful = !$this->internalError;
$this->internalError = false;
$this->retvalue = $this->_retvalue;
//echo $this->retvalue."\n\n";
- #line 3165 "smarty_internal_templateparser.php"
+
+ #line 3166 "smarty_internal_templateparser.php"
}

public function doParse($yymajor, $yytokenvalue)
Reply all
Reply to author
Forward
0 new messages