Details
Description
When attempting to approve glossary entries on Moodle 2.0 Preview 4 the approval page generates the following error
Catchable fatal error: Argument 2 passed to moodle_database::get_record() must be an array, string given, called in /html/mod/glossary/approve.php on line 14 and defined in /html/lib/dml/moodle_database.php on line 1166
This can be fixed by changing both lines 14 and 15 of approve.php
from:
$entry = $DB->get_record('glossary_entries', 'id', $eid, '*', MUST_EXIST);
$glossary = $DB->get_record('glossary', 'id', $entry->glossaryid, '*', MUST_EXIST);
to:
$entry = $DB->get_record('glossary_entries', array('id' => $eid) '*', MUST_EXIST);
$glossary = $DB->get_record('glossary', array('id'=> $entry->glossaryid), '*', MUST_EXIST);