From 5206daafd669f64cfa82f3241d08d2662571b872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Tue, 25 Sep 2007 11:29:10 +0000 Subject: #177529 by chx: if no checkbox was selected, we still need an empty array() --- includes/form.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'includes') 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(); + } } /** -- cgit v1.2.3