]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20601 fixed undefined variable in major upgrade redirection
authorPetr Skoda <skodak@moodle.org>
Sun, 8 Nov 2009 22:10:45 +0000 (22:10 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 8 Nov 2009 22:10:45 +0000 (22:10 +0000)
lib/setuplib.php

index ba1c48e76682dc233edb991e60f550246001b869..21afafd29315c2a73358a190e3729f6ac7f2c8b0 100644 (file)
@@ -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;
     }
 }