mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-13339 - ensure we don't continue the restore process if there is
no course header in the backup file. This bug was causing blank course records to be created when users tried to restore a non-moodle backup file such as a scorm file. backported from MOODLE_19_STABLE
This commit is contained in:
parent
2b72207cc3
commit
244cb43dff
1 changed files with 5 additions and 0 deletions
|
@ -5676,6 +5676,11 @@
|
|||
$info = restore_read_xml_info ($xml_file);
|
||||
//Reading course_header from file
|
||||
$course_header = restore_read_xml_course_header ($xml_file);
|
||||
|
||||
if(!is_object($course_header)){
|
||||
// ensure we fail if there is no course header
|
||||
$course_header = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined('RESTORE_SILENTLY')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue