cleaned up typecasting

This commit is contained in:
messju
2004-11-16 08:05:21 +00:00
parent 448a5fb06c
commit 07e6982d1d
2 changed files with 4 additions and 4 deletions

View File

@@ -101,7 +101,7 @@ function smarty_function_html_checkboxes($params, &$smarty)
settype($selected, 'array');
$_html_result = array();
if (is_array($options)) {
if (isset($options)) {
foreach ($options as $_key=>$_val)
$_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);

View File

@@ -103,14 +103,14 @@ function smarty_function_html_radios($params, &$smarty)
$_html_result = array();
if (isset($options) && is_array($options)) {
if (isset($options))) {
foreach ((array)$options as $_key=>$_val)
foreach ($options as $_key=>$_val)
$_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
} else {
foreach ((array)$values as $_i=>$_key) {
foreach ($values as $_i=>$_key) {
$_val = isset($output[$_i]) ? $output[$_i] : '';
$_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
}