summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2010-03-05 17:11:31 +0100
committerDerek Jones <derek.jones@ellislab.com>2010-03-05 17:11:31 +0100
commit68788d5577d9f101220e3e6e8fba0829feb136de (patch)
tree207fa587128703336c3fe541cabfdf88bd71d1ae /system/helpers
parent36591099aa01107294f8b2794351b078b7575a25 (diff)
bringing form helper in sync
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/form_helper.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 60d2631e9..5feb3ce66 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -66,7 +66,6 @@ if ( ! function_exists('form_open'))
}
}
-
// ------------------------------------------------------------------------
/**
@@ -266,7 +265,7 @@ if ( ! function_exists('form_textarea'))
* @param string
* @return type
*/
-if (! function_exists('form_multiselect'))
+if ( ! function_exists('form_multiselect'))
{
function form_multiselect($name = '', $options = array(), $selected = array(), $extra = '')
{
@@ -320,7 +319,7 @@ if ( ! function_exists('form_dropdown'))
{
$key = (string) $key;
- if (is_array($val))
+ if (is_array($val) && ! empty($val))
{
$form .= '<optgroup label="'.$key.'">'."\n";
@@ -638,7 +637,7 @@ if ( ! function_exists('form_prep'))
if ($field_name != '')
{
- $prepped_fields[$field_name] = $str;
+ $prepped_fields[$field_name] = $field_name;
}
return $str;