From 8abb67c6a941ea87156f2afe976724ae1cf88c03 Mon Sep 17 00:00:00 2001 From: nihaopaul Date: Mon, 12 Mar 2012 17:00:32 +0800 Subject: code readability improvements --- system/helpers/form_helper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'system/helpers') diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 8ccab99a2..82a4b9f57 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -317,18 +317,22 @@ if ( ! function_exists('form_dropdown')) // If name is really an array then we'll call the function again using the array if (is_array($name)) { + if ( ! isset($name['options'])) { $name['options'] = FALSE; - } + } + if ( ! isset($name['selected'])) { $name['selected'] = FALSE; } + if ( ! isset($name['extra'])) { $name['extra'] = FALSE; } + return form_dropdown($name['name'], $name['options'], $name['selected'], $name['extra']); } -- cgit v1.2.3-24-g4f1b