diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index e89e70a6..247ae840 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -1320,19 +1320,18 @@ class htmlSelect extends htmlElement {
}
echo "\n";
// if select box has only one element then show it as text
- if ((sizeof($this->elements) == 1) && !$this->multiSelect && $this->transformSingleSelect) {
+ if ((sizeof($this->elements) < 2) && !$this->multiSelect && $this->transformSingleSelect) {
echo '';
- echo ' ';
- if ($this->hasDescriptiveElements) {
- $keys = array_keys($this->elements);
- echo $keys[0];
+ if (sizeof($this->elements) == 1) {
+ echo ' ';
+ if ($this->hasDescriptiveElements) {
+ $keys = array_keys($this->elements);
+ echo $keys[0];
+ }
+ else {
+ echo $this->elements[0];
+ }
}
- else {
- echo $this->elements[0];
- }
- }
- elseif (sizeof($this->elements) == 0) {
- echo '';
}
if ($this->transient) {
return array();