Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
mudrd8mz authored and wdjunaidi committed Feb 10, 2012
1 parent de4fe98 commit a49e771
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backup/converter/moodle1/handlerlib.php
Expand Up @@ -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']);
Expand Down

0 comments on commit a49e771

Please sign in to comment.