-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.2
-
None
-
MOODLE_22_STABLE
We're restoring from 1.9.9+ that contains multichoices
After submitting the second step of the restore the process dies with:
Debug info: Argument 1 passed to moodle1_qtype_multichoice_handler::write_multichoice() must be an array, null given, called in .../moodle/question/type/multichoice/backup/moodle1/lib.php on line 53 and defined
The problem is that when calling:
$this->write_multichoice($data['multichoice'], $data['oldquestiontextformat']);
$data['multichoice'] is null
The header of the function is
protected function write_multichoice(array $multichoices, $oldquestiontextformat) {
We've got two solutions
1) Call the function only if $data['multichoice'] is not null
2) Declaring first parameter not as as array (this is not tested)
- duplicates
-
MDL-30742 Restore of 1.9 backups with missing question data is not robust
-
- Closed
-