- bugfix avoid PHP error on $smarty->configLoad(...) with invalid section specification (Forum Topic 22608)

This commit is contained in:
uwe.tews@googlemail.com
2012-08-01 21:31:24 +00:00
parent 897d40fe5c
commit b069c08eb4
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
01.08.2012
- bugfix avoid PHP error on $smarty->configLoad(...) with invalid section specification (Forum Topic 22608)
30.07.2012 30.07.2012
-bugfix {assign} in a nocache section should not overwrite existing variable values -bugfix {assign} in a nocache section should not overwrite existing variable values
during compilation (issue 109) during compilation (issue 109)

View File

@@ -240,9 +240,8 @@ class Smarty_Internal_Config {
} }
// scan sections // scan sections
if (!empty($sections)) { if (!empty($sections)) {
$sections = array_flip((array) $sections); foreach ((array) $sections as $this_section) {
foreach ($_config_vars['sections'] as $this_section => $dummy) { if (isset($_config_vars['sections'][$this_section])) {
if (isset($sections[$this_section])) {
foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) { foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {
if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) { if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
$scope_ptr->config_vars[$variable] = $value; $scope_ptr->config_vars[$variable] = $value;