diff --git a/inc/html.php b/inc/html.php
index 1d5ffeebbcc528a4dea8ed591bdec2d7cd23a2fd..10a599c84442619a68f08d00643976a52358067f 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" ';