From 36c8dc6e161e04ece9b9410ec53f79c72748dade Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 10 Jul 2009 08:08:00 +0000 Subject: [PATCH] MDL-19010 fixed redirect at login page if upgrade required, otherwise it would end with exception due to DB structure changes --- login/index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/login/index.php b/login/index.php index 6ac3e3f5f1..d6105c3b2c 100644 --- a/login/index.php +++ b/login/index.php @@ -4,8 +4,11 @@ require_once("../config.php"); /// check if major upgrade needed - also present in /index.php - if ((int)$CFG->version < 2009011900) { //1.9 or older - @require_logout(); + if ((int)$CFG->version < 2009071000) { //1.9 or older + try { + @require_logout(); + } catch (Exception $e) { + } redirect("$CFG->wwwroot/$CFG->admin/"); } -- 2.39.5