From 6e8ca8a6ced31932d2e9155b5ab8f4c0f653e5a3 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Mon, 16 Nov 2015 12:50:55 +1100 Subject: [PATCH] MDL-52141 backup: Ensure we don't alter the log record when parsing it. --- backup/util/helper/restore_log_rule.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backup/util/helper/restore_log_rule.class.php b/backup/util/helper/restore_log_rule.class.php index bb7d4e3faa4..6e182c019b1 100644 --- a/backup/util/helper/restore_log_rule.class.php +++ b/backup/util/helper/restore_log_rule.class.php @@ -97,7 +97,10 @@ class restore_log_rule implements processable { return $this->module . '-' . $this->action; } - public function process($log) { + public function process($inputlog) { + + // There might be multiple rules that process this log, we can't alter it in the process of checking it. + $log = clone($inputlog); // Reset the allpairs array $this->allpairs = array();