fixed semantically misleading check for $options (use isset() instead

of is_array() because it is always an array).

thanks to albert almeida.
This commit is contained in:
messju
2004-11-15 13:03:57 +00:00
parent 76db4e36a4
commit b96c5db2ea

View File

@@ -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);
}