Moodle

Notice with multicheckbox admin setting

Details

  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE

Description

I was coding up a new admin_setting_configmulticheckbox and it got the following notice:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /path/to/lib/adminlib.php on line 2224

foreach($this->choices as $key=>$description) {
if (in_array($key, $data)) { //// This line $checked = 'checked="checked"'; } else { $checked = ''; }

Looks like $data can be NULL. Probably once data is saved, this goes away.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: