aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-08 09:31:23 +0000
committerMario <mario@mariovavti.com>2021-03-08 09:31:23 +0000
commit951e9c8c4f39dd8577834d5bc501c05d80722de9 (patch)
tree6a42c6a229c7b2b3e13bc5af77a733d054242695 /vendor/smarty
parentf94b046333c57acde493ee5dc2511acc6baca701 (diff)
parent89415e17313578eb115c441480b6e0ddfa90afef (diff)
downloadvolse-hubzilla-5.4.tar.gz
volse-hubzilla-5.4.tar.bz2
volse-hubzilla-5.4.zip
Merge branch '5.4RC'5.4
Diffstat (limited to 'vendor/smarty')
-rw-r--r--vendor/smarty/smarty/CHANGELOG.md17
-rw-r--r--vendor/smarty/smarty/LICENSE2
-rw-r--r--vendor/smarty/smarty/composer.json2
-rw-r--r--vendor/smarty/smarty/lexer/smarty_internal_templateparser.y10
-rw-r--r--vendor/smarty/smarty/libs/Smarty.class.php7
-rw-r--r--vendor/smarty/smarty/libs/SmartyBC.class.php2
-rw-r--r--vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php4
-rw-r--r--vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php4
-rw-r--r--vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php2
-rw-r--r--vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_template.php16
10 files changed, 44 insertions, 22 deletions
diff --git a/vendor/smarty/smarty/CHANGELOG.md b/vendor/smarty/smarty/CHANGELOG.md
index 7eb151bf8..06b898223 100644
--- a/vendor/smarty/smarty/CHANGELOG.md
+++ b/vendor/smarty/smarty/CHANGELOG.md
@@ -6,6 +6,23 @@ 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
+- Changed error handlers and handling of undefined constants for php8-compatibility (set $errcontext argument optional) https://github.com/smarty-php/smarty/issues/605
+- Changed expected error levels in unit tests for php8-compatibility
+- Travis unit tests now run for all php versions >= 5.3, including php8
+- Travis runs on Xenial where possible
+
+### Fixed
+- PHP5.3 compatibility fixes
+- Brought lexer source functionally up-to-date with compiled version
+
## [3.1.36] - 2020-04-14
### Fixed
diff --git a/vendor/smarty/smarty/LICENSE b/vendor/smarty/smarty/LICENSE
index fb8ca6c6f..595e5993d 100644
--- a/vendor/smarty/smarty/LICENSE
+++ b/vendor/smarty/smarty/LICENSE
@@ -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 2.1 of the License, or (at your option) any later version.
+ version 3.0 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
diff --git a/vendor/smarty/smarty/composer.json b/vendor/smarty/smarty/composer.json
index 889cb9444..183f9f240 100644
--- a/vendor/smarty/smarty/composer.json
+++ b/vendor/smarty/smarty/composer.json
@@ -40,7 +40,7 @@
}
},
"require-dev": {
- "phpunit/phpunit": "6.4.1",
+ "phpunit/phpunit": "^7.5 || ^6.5 || ^5.7 || ^4.8",
"smarty/smarty-lexer": "^3.1"
}
}
diff --git a/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y b/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y
index b8c00e5d9..c6890642f 100644
--- a/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y
+++ b/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y
@@ -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) {
diff --git a/vendor/smarty/smarty/libs/Smarty.class.php b/vendor/smarty/smarty/libs/Smarty.class.php
index 9e0ca7670..6564be6d2 100644
--- a/vendor/smarty/smarty/libs/Smarty.class.php
+++ b/vendor/smarty/smarty/libs/Smarty.class.php
@@ -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 2.1 of the License, or (at your option) any later version.
+ * version 3.0 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,6 @@
* @author Uwe Tews <uwe dot tews at gmail dot com>
* @author Rodney Rehm
* @package Smarty
- * @version 3.1.34-dev
*/
/**
* 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
*/
@@ -800,7 +799,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* @param mixed $index index of directory to get, null to get all
* @param bool $isConfig true for config_dir
*
- * @return array list of template directories, or directory of $index
+ * @return array|string list of template directories, or directory of $index
*/
public function getTemplateDir($index = null, $isConfig = false)
{
diff --git a/vendor/smarty/smarty/libs/SmartyBC.class.php b/vendor/smarty/smarty/libs/SmartyBC.class.php
index 836f98153..0550e46dc 100644
--- a/vendor/smarty/smarty/libs/SmartyBC.class.php
+++ b/vendor/smarty/smarty/libs/SmartyBC.class.php
@@ -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 2.1 of the License, or (at your option) any later version.
+ * version 3.0 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
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
index b317c9f33..de7d4a224 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
@@ -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 "@constant('{$_index[1]}')";
+ return "(defined('{$_index[1]}') ? constant('{$_index[1]}') : null)";
} else {
- return "@constant({$_index[1]})";
+ return "(defined({$_index[1]}) ? constant({$_index[1]}) : null)";
}
// no break
case 'config':
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php
index a842fa8f3..90c5dcefa 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php
@@ -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')
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php
index 0ba00659d..56dca18fa 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php
@@ -65,7 +65,7 @@ class Smarty_Internal_ErrorHandler
*
* @return bool
*/
- public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
+ public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext = array())
{
$_is_muted_directory = false;
// add the SMARTY_DIR to the list of muted directories
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_template.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_template.php
index 477232ef8..ab4c3ec3b 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_template.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_template.php
@@ -127,12 +127,12 @@ class Smarty_Internal_ParseTree_Template extends Smarty_Internal_ParseTree
}
private function getChunkedSubtrees() {
- $chunks = [];
+ $chunks = array();
$currentMode = null;
- $currentChunk = [];
+ $currentChunk = array();
for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {
- if ($this->subtrees[ $key ]->data === '' && in_array($currentMode, ['textstripped', 'text', 'tag'])) {
+ if ($this->subtrees[ $key ]->data === '' && in_array($currentMode, array('textstripped', 'text', 'tag'))) {
continue;
}
@@ -150,19 +150,19 @@ class Smarty_Internal_ParseTree_Template extends Smarty_Internal_ParseTree
if ($newMode == $currentMode) {
$currentChunk[] = $this->subtrees[ $key ];
} else {
- $chunks[] = [
+ $chunks[] = array(
'mode' => $currentMode,
'subtrees' => $currentChunk
- ];
+ );
$currentMode = $newMode;
- $currentChunk = [$this->subtrees[ $key ]];
+ $currentChunk = array($this->subtrees[ $key ]);
}
}
if ($currentMode && $currentChunk) {
- $chunks[] = [
+ $chunks[] = array(
'mode' => $currentMode,
'subtrees' => $currentChunk
- ];
+ );
}
return $chunks;
}