Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31317 original_site_identifier_hash falls back to null during the…

… backup conversion

Even if the site identifier is not defined in the source 1.9 backup then the
converted 2.0 version should still contain the element to prevent PHP
notices on direct assignment.
  • Loading branch information...
commit c1f9cde6277379eedf5e3228460469542964dbf4 1 parent c0ac40e
@mudrd8mz mudrd8mz authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  backup/converter/moodle1/handlerlib.php
2  backup/converter/moodle1/handlerlib.php
@@ -345,6 +345,8 @@ public function on_root_element_end() {
// {@see backup_general_helper::backup_is_samesite()}
if (isset($backupinfo['original_site_identifier_hash'])) {
$this->xmlwriter->full_tag('original_site_identifier_hash', $backupinfo['original_site_identifier_hash']);
+ } else {
+ $this->xmlwriter->full_tag('original_site_identifier_hash', null);
$this->xmlwriter->full_tag('original_course_id', $originalcourseinfo['original_course_id']);
$this->xmlwriter->full_tag('original_course_fullname', $originalcourseinfo['original_course_fullname']);
Please sign in to comment.
Something went wrong with that request. Please try again.