mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +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
|
- allow $plugins_dir to be an array of directories
|
||||||
(Andreas Kossmeier, Monte)
|
(Andreas Kossmeier, Monte)
|
||||||
- move debug.tpl to SMARTY_DIR, add to constructor (Monte)
|
- move debug.tpl to SMARTY_DIR, add to constructor (Monte)
|
||||||
|
@@ -226,12 +226,12 @@ class Smarty
|
|||||||
{
|
{
|
||||||
if (is_array($tpl_var)){
|
if (is_array($tpl_var)){
|
||||||
foreach ($tpl_var as $key => $val) {
|
foreach ($tpl_var as $key => $val) {
|
||||||
if (!empty($key) && isset($val)) {
|
if ($key != '' && isset($val)) {
|
||||||
$this->_tpl_vars[$key] = $val;
|
$this->_tpl_vars[$key] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($tpl_var) && isset($value))
|
if ($tpl_var != '' && isset($value))
|
||||||
$this->_tpl_vars[$tpl_var] = $value;
|
$this->_tpl_vars[$tpl_var] = $value;
|
||||||
}
|
}
|
||||||
$this->_extract = true;
|
$this->_extract = true;
|
||||||
|
@@ -226,12 +226,12 @@ class Smarty
|
|||||||
{
|
{
|
||||||
if (is_array($tpl_var)){
|
if (is_array($tpl_var)){
|
||||||
foreach ($tpl_var as $key => $val) {
|
foreach ($tpl_var as $key => $val) {
|
||||||
if (!empty($key) && isset($val)) {
|
if ($key != '' && isset($val)) {
|
||||||
$this->_tpl_vars[$key] = $val;
|
$this->_tpl_vars[$key] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($tpl_var) && isset($value))
|
if ($tpl_var != '' && isset($value))
|
||||||
$this->_tpl_vars[$tpl_var] = $value;
|
$this->_tpl_vars[$tpl_var] = $value;
|
||||||
}
|
}
|
||||||
$this->_extract = true;
|
$this->_extract = true;
|
||||||
|
Reference in New Issue
Block a user