diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-25 11:29:10 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-25 11:29:10 +0000 |
commit | 5206daafd669f64cfa82f3241d08d2662571b872 (patch) | |
tree | 3810369a9a9ca2b44777796e1c5d0d1abcd58371 | |
parent | 206d652a824284cb08736f5f8182679fac8ed3b0 (diff) | |
download | brdo-5206daafd669f64cfa82f3241d08d2662571b872.tar.gz brdo-5206daafd669f64cfa82f3241d08d2662571b872.tar.bz2 |
#177529 by chx: if no checkbox was selected, we still need an empty array()
-rw-r--r-- | includes/form.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index ca6795c67..3c1a3557e 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1028,7 +1028,7 @@ function form_type_checkbox_value($form, $edit = FALSE) { * The data that will appear in the $form_state['values'] collection * for this element. Return nothing to use the default. */ - function form_type_checkboxes_value($form, $edit = FALSE) { +function form_type_checkboxes_value($form, $edit = FALSE) { if ($edit === FALSE) { $value = array(); $form += array('#default_value' => array()); @@ -1037,6 +1037,9 @@ function form_type_checkbox_value($form, $edit = FALSE) { } return $value; } + elseif (!isset($edit)) { + return array(); + } } /** |