mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user