summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/forms.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/forms.php b/utils/forms.php
index a450463..2d34861 100644
--- a/utils/forms.php
+++ b/utils/forms.php
@@ -331,8 +331,10 @@ class ListEditor {
$str .= $indent . "//-->\n";
$str .= $indent . "</script>\n";
$str .= $indent . "<select multiple size=\"8\" id=\"items\" name=\"".$this->name."[]\">\n";
- foreach($this->values as $key => $val) {
- $str .= $indent . " <option value=\"".$key.":".$val."\">".$key.":".$val."</option>\n";
+ if(sizeof($this->values)) {
+ foreach($this->values as $key => $val) {
+ $str .= $indent . " <option value=\"".$key.":".$val."\">".$key.":".$val."</option>\n";
+ }
}
$str .= $indent . "</select><br/>\n";
$str .= $indent . "<img src=\"gfx/up.png\" button onclick=\"moveUp()\"/><br/>\n";