Skip to content
Permalink
Browse files

MDL-65375 Restore: Null data in other field should be serialised

If the 'other' field is empty, then following a restore of course
logs, it should still be serialised so that it is consistent with
the normal behaviour when logging.

Without this change, an event with null value for other has the
field set to NULL if you restore it, but 'N;' when the event is
initially created.
  • Loading branch information...
sammarshallou committed Apr 18, 2019
1 parent 2711a40 commit 2327fedbea4c6a0c99f417e1476afe6fb0970812
Showing with 2 additions and 2 deletions.
  1. +2 −2 admin/tool/log/backup/moodle2/restore_tool_log_logstore_subplugin.class.php
@@ -137,14 +137,14 @@ protected function process_log($data) {
}
}
}
// Now we want to serialize it so we can store it in the DB.
$data->other = serialize($data->other);
} else {
$message = "Event class not found: \"$eventclass\". Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return; // No such class, can not restore.
}
}
// Now we want to serialize it so we can store it in the DB.
$data->other = serialize($data->other);
return $data;
}

0 comments on commit 2327fed

Please sign in to comment.
You can’t perform that action at this time.