From 2f15514fa4108acaa3a0df20b4df9782d89fd26e Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 17 Jun 2022 11:26:26 +0200 Subject: [PATCH] MDL-75005 core: remove invalid addslashes() --- lib/setuplib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/setuplib.php b/lib/setuplib.php index 8d0aa1dc04a..07f2084fbba 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -812,8 +812,8 @@ function initialise_local_config_cache() { if (!empty($CFG->siteidentifier) && !file_exists($bootstrapcachefile)) { $contents = "siteidentifier = '" . addslashes($CFG->siteidentifier) . "'; -\$CFG->bootstraphash = '" . hash_local_config_cache() . "'; +\$CFG->siteidentifier = " . var_export($CFG->siteidentifier, true) . "; +\$CFG->bootstraphash = " . var_export(hash_local_config_cache(), true) . "; // Only if the file is not stale and has not been defined. if (\$CFG->bootstraphash === hash_local_config_cache() && !defined('SYSCONTEXTID')) { define('SYSCONTEXTID', ".SYSCONTEXTID.");