Moodle

admin\modules.php: Argument 4 passed to moodle_database::set_field() must be an array

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Administration
  • Labels:
    None
  • Environment:
    Moodle 2.0
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Catchable fatal error:

  • Argument 4 passed to moodle_database::set_field() must be an array, string given,
  • called in admin\modules.php on line 62
  • and defined in lib\dml\moodle_database.php on line 1165

lines 61 and 62 in "admin\modules.php" appear not to be necessary.
so one workaround is just to remove the offending lines
// REMOVE 61: $DB->set_field('course_modules', 'visible', '1', 'visibleold',
// REMOVE 62: '1', array('module'=>$module->id)); // Get the previous saved visible state for the course module.

Activity

Hide
Petr Škoda (skodak) added a comment -

fixed thanks

Show
Petr Škoda (skodak) added a comment - fixed thanks
Hide
Gordon Bateson added a comment -

thank you

Show
Gordon Bateson added a comment - thank you

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: