From 42862ca49046af4591d45f0b912c5a3bd7fa3829 Mon Sep 17 00:00:00 2001 From: mohrt Date: Tue, 30 Oct 2001 21:01:57 +0000 Subject: [PATCH] fix assign function problem with empty value passed --- Smarty.addons.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Smarty.addons.php b/Smarty.addons.php index 572ff374..ec6ea3c4 100644 --- a/Smarty.addons.php +++ b/Smarty.addons.php @@ -186,14 +186,14 @@ function smarty_mod_default($string, $default="") \*======================================================================*/ function smarty_func_assign($args, &$smarty_obj) { - extract($args); + extract($args); if (empty($var)) { $smarty_obj->_trigger_error_msg("assign: missing 'var' parameter"); return; } - if (!isset($value)) { + if (!in_array('value', array_keys($args))) { $smarty_obj->_trigger_error_msg("assign: missing 'value' parameter"); return; }