Compare commits

..

10 Commits

Author SHA1 Message Date
Simon Wisselink f25dd94f9f Incorporated AnrDaemons suggestions, making composer figure out the required phpunit version instead of specifying it explicitly and removing a unneeded error supression (@). 2020-09-12 21:15:58 +02:00
Simon Wisselink d1dcee0d9e run travis in xenial where possible for latest php versions. Fix unit tests from freakingo over inconsistent error messages in php8-beta. 2020-09-11 13:56:51 +02:00
Simon Wisselink 8df47cf030 changelog 2020-09-11 13:30:41 +02:00
Simon Wisselink 6f41b9bfc9 Fixed a unit test that accidentally passed on phpunit < 7 because of sloppy string comparison. 2020-09-11 13:26:00 +02:00
Simon Wisselink 7d48d8692f Fix unit tests for php8, force composer to think we are still php7 to pick a supported phpunit and being less specific about an error msg because PHP8 is in active development and the exact wording is changing. 2020-09-11 12:55:43 +02:00
Simon Wisselink ca2be225d6 Attempt to fix travis runs for (almost) all php versions supported 2020-09-11 11:07:03 +02:00
Simon Wisselink 3b0b48ed3e Updated UndefinedTemplateVarTest for PHP8 (and disabled a check for PHP<5.6) and re-enabled php:nightly in travis config 2020-09-11 10:21:25 +02:00
Simon Wisselink 62dc42b0c5 php5 compat syntax 2020-09-11 00:39:17 +02:00
Simon Wisselink 818aa3c3da Getting ready for PHP8, handling changed error levels/handlers mostly 2020-09-11 00:36:56 +02:00
Jorge Sá Pereira e12895359b Set $errcontext argument optional to support PHP 8
- Argument is optional and deprecated in PHP 7.2
2020-09-06 22:37:38 +01:00
6 changed files with 8 additions and 15 deletions
-1
View File
@@ -14,7 +14,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- PHP5.3 compatibility fixes
- Brought lexer source functionally up-to-date with compiled version
## [3.1.36] - 2020-04-14
+1 -1
View File
@@ -3,7 +3,7 @@ Smarty: the PHP compiling template engine
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
+2 -8
View File
@@ -249,13 +249,7 @@ template ::= template PHP(B). {
// template text
template ::= template TEXT(B). {
$text = $this->yystack[ $this->yyidx + 0 ]->minor;
if ((string)$text == '') {
$this->current_buffer->append_subtree($this, null);
}
$this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Text($text, $this->strip));
$this->current_buffer->append_subtree($this, $this->compiler->processText(B));
}
// strip on
template ::= template STRIPON. {
@@ -314,7 +308,7 @@ smartytag(A)::= SIMPLETAG(B). {
$tag = trim(substr(B, $this->compiler->getLdelLength(), -$this->compiler->getRdelLength()));
if ($tag == 'strip') {
$this->strip = true;
A = null;
A = null;;
} else {
if (defined($tag)) {
if ($this->security) {
+2 -2
View File
@@ -6,7 +6,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -27,7 +27,7 @@
* @author Uwe Tews <uwe dot tews at gmail dot com>
* @author Rodney Rehm
* @package Smarty
* @version 3.1.36
* @version 3.1.34-dev
*/
/**
* set SMARTY_DIR to absolute path to Smarty library files.
+1 -1
View File
@@ -6,7 +6,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -94,9 +94,9 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
break;
}
if (strpos($_index[ 1 ], '$') === false && strpos($_index[ 1 ], '\'') === false) {
return "(defined('{$_index[1]}') ? constant('{$_index[1]}') : null)";
return "defined('{$_index[1]}') ? constant('{$_index[1]}') : null";
} else {
return "(defined({$_index[1]}) ? constant({$_index[1]}) : null)";
return "defined({$_index[1]}) ? constant({$_index[1]}) : null";
}
// no break
case 'config':