From: skodak Date: Fri, 10 Jul 2009 08:08:00 +0000 (+0000) Subject: MDL-19010 fixed redirect at login page if upgrade required, otherwise it would end... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=36c8dc6e161e04ece9b9410ec53f79c72748dade;p=moodle.git MDL-19010 fixed redirect at login page if upgrade required, otherwise it would end with exception due to DB structure changes --- 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/"); }