diff options
-rw-r--r-- | inc/html.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/inc/html.php b/inc/html.php index 1d5ffeebb..10a599c84 100644 --- a/inc/html.php +++ b/inc/html.php @@ -234,10 +234,12 @@ function html_btn($name,$id,$akey,$params,$method='get'){ $ret .= '<form class="button" method="'.$method.'" action="'.$script.'"><div class="no">'; - reset($params); - while (list($key, $val) = each($params)) { - $ret .= '<input type="hidden" name="'.$key.'" '; - $ret .= 'value="'.htmlspecialchars($val).'" />'; + if(is_array($params)){ + reset($params); + while (list($key, $val) = each($params)) { + $ret .= '<input type="hidden" name="'.$key.'" '; + $ret .= 'value="'.htmlspecialchars($val).'" />'; + } } $ret .= '<input type="submit" value="'.htmlspecialchars($label).'" class="button" '; |