diff --git a/form.php b/form.php index 919d446..0de6f99 100644 --- a/form.php +++ b/form.php @@ -781,6 +781,8 @@ class formfield { // No $this->multiple, $this->rows $this->cols $this->placeholder, // $this->maxlength + if (! is_array ($this->titles) || count ($this->titles) === 0) + $this->titles = array (""); $res = ""; $res .= "
\n"; if ($this->label !== "") { - $res .= " \n"; } $res .= "
\n"; - if (! is_array ($this->titles) || count ($this->titles) === 0) - $this->titles = array (""); foreach ($this->titles as $key=>$val) { $res .= "
\n"; @@ -818,9 +823,9 @@ class formfield $res .= "' value='unset'"; $res .= "/>"; $res .= "