Skip to content
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...
1 parent c0ac40e commit c1f9cde6277379eedf5e3228460469542964dbf4 @mudrd8mz mudrd8mz committed Jan 26, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 backup/converter/moodle1/handlerlib.php
View
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']);

0 comments on commit c1f9cde

Please sign in to comment.
Something went wrong with that request. Please try again.