- bugfix broken PHP 5.2 compatibility

This commit is contained in:
uwetews
2015-12-19 20:10:45 +01:00
parent e32720ef4e
commit 224a1c4874
6 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
language: php language: php
php: php:
- 5.2
- 5.3 - 5.3
- 5.4 - 5.4
- 5.5 - 5.5

View File

@@ -1,6 +1,7 @@
 ===== 3.1.29-dev ===== (xx.xx.2015)  ===== 3.1.29-dev ===== (xx.xx.2015)
19.12.2015 19.12.2015
- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138 - bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138
- bugfix broken PHP 5.2 compatibility
18.12.2015 18.12.2015
- bugfix regression when modifier parameter was follow by math https://github.com/smarty-php/smarty/issues/132 - bugfix regression when modifier parameter was follow by math https://github.com/smarty-php/smarty/issues/132

View File

@@ -162,7 +162,7 @@ class Smarty_Internal_Method_ConfigLoad
* *
* @return mixed the value of the config variable * @return mixed the value of the config variable
*/ */
public function _getConfigVariable(\Smarty_Internal_Template $tpl, $varName, $errorEnable = true) public function _getConfigVariable(Smarty_Internal_Template $tpl, $varName, $errorEnable = true)
{ {
$_ptr = $tpl; $_ptr = $tpl;
while ($_ptr !== null) { while ($_ptr !== null) {

View File

@@ -20,7 +20,7 @@ class Smarty_Internal_Runtime_TplFunction
* *
* @throws \SmartyException * @throws \SmartyException
*/ */
public function callTemplateFunction(\Smarty_Internal_Template $tpl, $name, $params, $nocache) public function callTemplateFunction(Smarty_Internal_Template $tpl, $name, $params, $nocache)
{ {
if (isset($tpl->tpl_function[$name])) { if (isset($tpl->tpl_function[$name])) {
if (!$tpl->caching || ($tpl->caching && $nocache)) { if (!$tpl->caching || ($tpl->caching && $nocache)) {

View File

@@ -17,7 +17,7 @@ class Smarty_Internal_Runtime_UpdateScope
* @param string $varName variable name * @param string $varName variable name
* @param int $scope scope to which bubble up variable value * @param int $scope scope to which bubble up variable value
*/ */
public function updateScope(\Smarty_Internal_Template $tpl, $varName, $scope = Smarty::SCOPE_LOCAL) public function updateScope(Smarty_Internal_Template $tpl, $varName, $scope = Smarty::SCOPE_LOCAL)
{ {
if (!$scope && !$tpl->scope) { if (!$scope && !$tpl->scope) {
return; return;

View File

@@ -17,7 +17,7 @@ class Smarty_Internal_Runtime_Var
* @param string $varName template variable name * @param string $varName template variable name
* @param bool $nocache cache mode of variable * @param bool $nocache cache mode of variable
*/ */
public function createLocalArrayVariable(\Smarty_Internal_Template $tpl, $varName, $nocache = false) public function createLocalArrayVariable(Smarty_Internal_Template $tpl, $varName, $nocache = false)
{ {
if (!isset($tpl->tpl_vars[$varName])) { if (!isset($tpl->tpl_vars[$varName])) {
$tpl->tpl_vars[$varName] = new Smarty_Variable(array(), $nocache); $tpl->tpl_vars[$varName] = new Smarty_Variable(array(), $nocache);