Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prevent some notices at install. MDL-16188 ; merged from 18_STABLE

  • Loading branch information...
commit bb61ce2e916cd1667e38b9c7a394abe4448a1503 1 parent a78e7e7
stronk7 authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/environmentlib.php
View
5 lib/environmentlib.php
@@ -7,7 +7,7 @@
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
-// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
+// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com //
// //
// This program is free software; you can redistribute it and/or modify //
@@ -525,7 +525,8 @@ function environment_custom_checks($version) {
$results = array();
/// Get current Moodle version (release) for later compare
- $current_version = normalize_version($CFG->release);
+ $release = isset($CFG->release) ? $CFG->release : $version; /// In case $CFG fails (at install) use $version
+ $current_version = normalize_version($release);
/// Get the enviroment version we need
if (!$data = get_environment_for_version($version)) {
Please sign in to comment.
Something went wrong with that request. Please try again.