aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/dropdown.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
commitec7b94a64aef23b85866ecdac8e8acc712d29bb6 (patch)
treea108205c3fa0b694d8ce0ebaafd259480d6b530a /views/default/input/dropdown.php
parentc80ba5aa03264dd64c20ed8ae222e87f9371a44d (diff)
parent2b68a4d217c35a5587c462620789493cf2804ba2 (diff)
downloadelgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.gz
elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'views/default/input/dropdown.php')
-rw-r--r--views/default/input/dropdown.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/views/default/input/dropdown.php b/views/default/input/dropdown.php
index 6fd97d3b5..fccccb888 100644
--- a/views/default/input/dropdown.php
+++ b/views/default/input/dropdown.php
@@ -3,7 +3,7 @@
* Elgg dropdown input
* Displays a dropdown (select) input field
*
- * NB: Default values of FALSE or NULL will match '' (empty string) and not 0.
+ * @warning Default values of FALSE or NULL will match '' (empty string) and not 0.
*
* @package Elgg
* @subpackage Core
@@ -47,13 +47,15 @@ if ($options_values) {
echo "<option $option_attrs>$option</option>";
}
} else {
- foreach ($options as $option) {
+ if (is_array($options)) {
+ foreach ($options as $option) {
- $option_attrs = elgg_format_attributes(array(
- 'selected' => (string)$option == (string)$value
- ));
+ $option_attrs = elgg_format_attributes(array(
+ 'selected' => (string)$option == (string)$value
+ ));
- echo "<option $option_attrs>$option</option>";
+ echo "<option $option_attrs>$option</option>";
+ }
}
}
?>