MDL-59562 core: changed branch behaviour during initial install.

This commit is contained in:
Peter Burnett 2020-01-15 15:46:46 +10:00
parent 147a895ad0
commit 4fac690ace

View File

@ -753,6 +753,13 @@ class core_plugin_manager {
global $CFG;
if (empty($branch)) {
$branch = $CFG->branch;
if (empty($branch)) {
// During initial install there is no branch set.
require($CFG->dirroot . '/version.php');
$branch = (int)$branch;
// Force CFG->branch to int value during install.
$CFG->branch = $branch;
}
}
$return = true;
foreach ($this->get_plugins() as $type => $plugins) {