summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 069101063..eb97913f1 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -247,7 +247,7 @@ function form_checkbox($data = '', $value = '', $checked = TRUE, $extra = '')
{
$defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
- if (isset($data['checked']))
+ if (is_array($data) AND array_key_exists('checked', $data))
{
$checked = $data['checked'];
@@ -256,7 +256,7 @@ function form_checkbox($data = '', $value = '', $checked = TRUE, $extra = '')
}
if ($checked == TRUE)
- $defaults['checked'] = ' checked="checked"';
+ $defaults['checked'] = 'checked';
else
unset($defaults['checked']);