Merge branch 'feature/php8-support' of github.com:smarty-php/smarty into feature/php8-support

This commit is contained in:
Simon Wisselink
2021-01-08 17:44:50 +01:00
7 changed files with 20 additions and 9 deletions

1
.gitattributes vendored
View File

@@ -11,7 +11,6 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/error_reporting.ini export-ignore
/make-release.sh export-ignore
/phpunit.sh export-ignore
/phpunit.xml export-ignore

View File

@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [3.1.38] - 2021-01-08
### Fixed
- Smarty::SMARTY_VERSION wasn't updated https://github.com/smarty-php/smarty/issues/628
## [3.1.37] - 2021-01-07
### Changed
- Switch CI from Travis to Github CI
- Updated unit tests to avoid skipped and risky test warnings
@@ -26,6 +33,7 @@ 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

View File

@@ -1 +0,0 @@
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

View File

@@ -249,7 +249,13 @@ template ::= template PHP(B). {
// template text
template ::= template TEXT(B). {
$this->current_buffer->append_subtree($this, $this->compiler->processText(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));
}
// strip on
template ::= template STRIPON. {
@@ -308,7 +314,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) {

View File

@@ -27,7 +27,6 @@
* @author Uwe Tews <uwe dot tews at gmail dot com>
* @author Rodney Rehm
* @package Smarty
* @version 3.1.36
*/
/**
* set SMARTY_DIR to absolute path to Smarty library files.
@@ -112,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.36';
const SMARTY_VERSION = '3.1.38';
/**
* define variable scopes
*/

View File

@@ -115,7 +115,7 @@ class Smarty_Internal_Config_File_Compiler
$this->smarty->_debug->start_compile($this->template);
}
// init the lexer/parser to compile the config file
/* @var Smarty_Internal_ConfigFileLexer $this ->lex */
/* @var Smarty_Internal_ConfigFileLexer $this->lex */
$this->lex = new $this->lexer_class(
str_replace(
array(
@@ -127,7 +127,7 @@ class Smarty_Internal_Config_File_Compiler
) . "\n",
$this
);
/* @var Smarty_Internal_ConfigFileParser $this ->parser */
/* @var Smarty_Internal_ConfigFileParser $this->parser */
$this->parser = new $this->parser_class($this->lex, $this);
if (function_exists('mb_internal_encoding')
&& function_exists('ini_get')

View File

@@ -59,7 +59,7 @@ class StreamVariableTest extends PHPUnit_Smarty
}
*/
/**
* test no existant stream variable
* test no existent stream variable
*/
// public function testStreamVariable2()
// {