From d4f95ceee56b8ed84608f76b7f05ed513d78644b Mon Sep 17 00:00:00 2001 From: mohrt Date: Thu, 21 Nov 2002 15:12:12 +0000 Subject: [PATCH] get rid of testing for a set value with assign function, just set to whatever is passed into the template --- RELEASE_NOTES | 2 +- Smarty.class.php | 6 +++--- libs/Smarty.class.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 955630d2..b64c03c9 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -4,7 +4,7 @@ The mtime on compiled files will now match the source files, in the case where the source file may not get the current timestamp, recompiling will still work as expected. Proper support for open_basedir has been added, so Smarty should -work correctly in safe mode. Added a few new features such as formattext block +work correctly in safe mode. Added a few new features such as textformat block function, strip variable modifier and optgroup support for html_options. Also other minor bug fixes, see the Change Log. diff --git a/Smarty.class.php b/Smarty.class.php index ae476ee7..76579f63 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -229,12 +229,12 @@ class Smarty { if (is_array($tpl_var)){ foreach ($tpl_var as $key => $val) { - if ($key != '' && isset($val)) { + if ($key != '') { $this->_tpl_vars[$key] = $val; } } } else { - if ($tpl_var != '' && isset($value)) + if ($tpl_var != '') $this->_tpl_vars[$tpl_var] = $value; } $this->_extract = true; @@ -246,7 +246,7 @@ class Smarty \*======================================================================*/ function assign_by_ref($tpl_var, &$value) { - if ($tpl_var != '' && isset($value)) + if ($tpl_var != '') $this->_tpl_vars[$tpl_var] = &$value; $this->_extract = true; } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ae476ee7..76579f63 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -229,12 +229,12 @@ class Smarty { if (is_array($tpl_var)){ foreach ($tpl_var as $key => $val) { - if ($key != '' && isset($val)) { + if ($key != '') { $this->_tpl_vars[$key] = $val; } } } else { - if ($tpl_var != '' && isset($value)) + if ($tpl_var != '') $this->_tpl_vars[$tpl_var] = $value; } $this->_extract = true; @@ -246,7 +246,7 @@ class Smarty \*======================================================================*/ function assign_by_ref($tpl_var, &$value) { - if ($tpl_var != '' && isset($value)) + if ($tpl_var != '') $this->_tpl_vars[$tpl_var] = &$value; $this->_extract = true; }