diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-12-17 19:28:26 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-17 19:28:26 +0000 |
| commit | fe396410894f9fcf430e31216312f70db800d96e (patch) | |
| tree | fc1222c074e0f8ffd2d952688353f5bf79e360f5 /kohana/helpers/form.php | |
| parent | 093fb407a839b1bdacd0cd6036b349a42dcfea7d (diff) | |
Update Kohana code to r3799 from their svn head. All tests pass.
Resolved upstream tickets:
http://dev.kohanaphp.com/ticket/972
Command:
svn merge -c19275 vendor/kohana/modified/kohana trunk/kohana
Diffstat (limited to 'kohana/helpers/form.php')
| -rw-r--r-- | kohana/helpers/form.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kohana/helpers/form.php b/kohana/helpers/form.php index 30753f1e..5162a1ad 100644 --- a/kohana/helpers/form.php +++ b/kohana/helpers/form.php @@ -241,6 +241,7 @@ class form_Core { */ public static function dropdown($data, $options = NULL, $selected = NULL, $extra = '') { + if ( ! is_array($data)) { $data = array('name' => $data); @@ -266,6 +267,9 @@ class form_Core { // Key should always be a string $key = (string) $key; + // Selected must always be a string + $selected = (string) $selected; + if (is_array($val)) { $input .= '<optgroup label="'.$key.'">'."\n"; |
