Using:
6.2-dev ,14 November, and it was ok.

Using:
6.2-dev ,14 November, it is not breaking again (see attachment)

This is a great module that should be in core :)

CommentFileSizeAuthor
Capture.PNG12 KBbakr

Comments

bakr’s picture

sorry forgot to type the error message

error : warning: Illegal offset type in F:\htdocs\hd\includes\form.inc on line 1212.

The second line in the original message above, is pointing to the 6.2-dev re-release on 15 November.

I have looked into the release history trying re-download the earlier copy, but it was overwritten with the newer one.

The effect is "End user not able to clear all selections, at least one should be ticked!"

Thanks and Best Regards

bakr’s picture

form.inc on line 1212

/**
 * Helper function to determine the value for a checkboxes form element.
 *
 * @param $form
 *   The form element whose value is being populated.
 * @param $edit
 *   The incoming POST data to populate the form element. If this is FALSE,
 *   the element's default value should be returned.
 * @return
 *   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) {
  if ($edit === FALSE) {
    $value = array();
    $form += array('#default_value' => array());
    foreach ($form['#default_value'] as $key) {

      $value[$key] = 1;          //  <<<<<<<< This is line 1212 <<<<<<<<<<<<<<

    }
    return $value;
  }
  elseif (!isset($edit)) {
    return array();
  }
}

Possible php Solution could be found here:
http://www.ozzu.com/programming-forum/php-error-illegal-offset-type-t758...

bakr’s picture

any update :)

johnv’s picture

Status: Active » Closed (duplicate)

The following issue contains a patch for this issue: #1484008: Error on unchecking all checkboxes
Even though this one is older, marking it as a duplicate. I'll post a comment on #884914: Error deselecting all checkboxes..., too.