From a38c7a10813378f716727f352f1bfc1faaef77ed Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 8 Nov 2009 22:10:45 +0000 Subject: [PATCH] MDL-20601 fixed undefined variable in major upgrade redirection --- lib/setuplib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/setuplib.php b/lib/setuplib.php index ba1c48e766..21afafd293 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -717,9 +717,10 @@ function redirect_if_major_upgrade_required() { } catch (Exception $e) { // Ignore any errors, redirect to upgrade anyway. } + $url = $CFG->wwwroot . '/' . $CFG->admin . '/index.php'; @header($_SERVER['SERVER_PROTOCOL'] . ' 303 See Other'); - @header('Location: ' . $CFG->wwwroot . '/' . $CFG->admin . '/index.php'); - echo bootstrap_renderer::plain_redirect_message($encodedurl); + @header('Location: ' . $url); + echo bootstrap_renderer::plain_redirect_message(htmlspecialchars($url)); exit; } } -- 2.39.5