summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-02-24 20:24:28 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-02-24 20:24:28 +0100
commit06a4bf8fb79fe29a8e6fff50a8d14ce37e40e895 (patch)
tree06829afb73250b2a1847ef9665f7378c1c91c5bc /inc
parentd15580d81f02ea5d8d9298af32eb82b8b74d462a (diff)
downloadrpg-06a4bf8fb79fe29a8e6fff50a8d14ce37e40e895.tar.gz
rpg-06a4bf8fb79fe29a8e6fff50a8d14ce37e40e895.tar.bz2
added type check in html_btn #715
darcs-hash:20060224192428-7ad00-c6910ed8cf9656f61b1c813e899f7f75d13309ab.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/html.php10
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" ';