From b96c5db2ea50b7118c8431b319e051a1ede2569a Mon Sep 17 00:00:00 2001 From: messju Date: Mon, 15 Nov 2004 13:03:57 +0000 Subject: [PATCH] fixed semantically misleading check for $options (use isset() instead of is_array() because it is always an array). thanks to albert almeida. --- libs/plugins/function.html_options.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/plugins/function.html_options.php b/libs/plugins/function.html_options.php index da5571c5..ae864f73 100644 --- a/libs/plugins/function.html_options.php +++ b/libs/plugins/function.html_options.php @@ -72,14 +72,14 @@ function smarty_function_html_options($params, &$smarty) $_html_result = ''; - if (is_array($options)) { + if (isset($options)) { foreach ($options as $_key=>$_val) $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected); } else { - foreach ((array)$values as $_i=>$_key) { + foreach ($values as $_i=>$_key) { $_val = isset($output[$_i]) ? $output[$_i] : ''; $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected); }