From fe396410894f9fcf430e31216312f70db800d96e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 17 Dec 2008 19:28:26 +0000 Subject: 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 --- kohana/helpers/form.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kohana/helpers/form.php') 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 .= ''."\n"; -- cgit v1.2.3