- optimization remove unneeded call to update acopes when {assign} scope and template scope was local (default)

This commit is contained in:
uwetews
2016-08-14 03:32:07 +02:00
parent 1b6d2a9375
commit db01627c1c
3 changed files with 3 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
- bugfix $smarty_>debugging = true; did E_NOTICE messages when {eval} tag was used https://github.com/smarty-php/smarty/issues/266
- bugfix Class 'Smarty_Internal_Runtime_ValidateCompiled' not found when upgrading from some older Smarty versions with existing
compiled or cached template files https://github.com/smarty-php/smarty/issues/269
- optimization remove unneeded call to update acopes when {assign} scope and template scope was local (default)
===== 3.1.30 ===== (07.08.2016)

View File

@@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.31-dev/3';
const SMARTY_VERSION = '3.1.31-dev/4';
/**
* define variable scopes

View File

@@ -398,7 +398,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
$this->tpl_vars[ $varName ] = new Smarty_Variable($value, $nocache || $this->isRenderingCache);
}
if ($scope >= 0) {
if (isset($scope) || isset($this->scope)) {
if ($scope > 0 || $this->scope > 0) {
$this->smarty->ext->_updateScope->_updateScope($this, $varName, $scope);
}
}