From 81870d3e0ddaed10abfbe23a1ce9c095a201e573 Mon Sep 17 00:00:00 2001 From: Stefan Hanauska Date: Mon, 16 Dec 2024 09:19:55 +0100 Subject: [PATCH] MBS-9795: Fix problem during installation --- classes/local/hook_callbacks.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/local/hook_callbacks.php b/classes/local/hook_callbacks.php index 91121f2..c07e204 100644 --- a/classes/local/hook_callbacks.php +++ b/classes/local/hook_callbacks.php @@ -50,6 +50,11 @@ class hook_callbacks { public static function inject_backlinks_into_activity_header(before_http_headers $beforehttpheadershook): void { global $OUTPUT, $PAGE; + // Don't run during initial install. + if (during_initial_install()) { + return; + } + if (get_config('mod_learningmap', 'backlinkallowed') == 0) { return; }