mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
change tests in append and assign to != '' instead of empty(), which is more accurate
This commit is contained in:
3
NEWS
3
NEWS
@@ -1,3 +1,6 @@
|
||||
- change logic in assign() and append() to test var names
|
||||
against != '' instead of empty() (Monte)
|
||||
- fix PHP notice in append() function (Monte)
|
||||
- allow $plugins_dir to be an array of directories
|
||||
(Andreas Kossmeier, Monte)
|
||||
- move debug.tpl to SMARTY_DIR, add to constructor (Monte)
|
||||
|
@@ -226,12 +226,12 @@ class Smarty
|
||||
{
|
||||
if (is_array($tpl_var)){
|
||||
foreach ($tpl_var as $key => $val) {
|
||||
if (!empty($key) && isset($val)) {
|
||||
if ($key != '' && isset($val)) {
|
||||
$this->_tpl_vars[$key] = $val;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!empty($tpl_var) && isset($value))
|
||||
if ($tpl_var != '' && isset($value))
|
||||
$this->_tpl_vars[$tpl_var] = $value;
|
||||
}
|
||||
$this->_extract = true;
|
||||
|
@@ -226,12 +226,12 @@ class Smarty
|
||||
{
|
||||
if (is_array($tpl_var)){
|
||||
foreach ($tpl_var as $key => $val) {
|
||||
if (!empty($key) && isset($val)) {
|
||||
if ($key != '' && isset($val)) {
|
||||
$this->_tpl_vars[$key] = $val;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!empty($tpl_var) && isset($value))
|
||||
if ($tpl_var != '' && isset($value))
|
||||
$this->_tpl_vars[$tpl_var] = $value;
|
||||
}
|
||||
$this->_extract = true;
|
||||
|
Reference in New Issue
Block a user