summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-08-27 17:28:31 +0200
committeradmin <devnull@localhost>2006-08-27 17:28:31 +0200
commit57b3d39cb79bb3b8d193e0e345a62e3396e519f2 (patch)
treea453970cc05172c819df5bd7a04b3c431e67a37a /system/helpers/form_helper.php
parent141808ad31d4eefad4c6c3dbaf8306fac2342668 (diff)
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']);