MDL-59629 mod_block: Set the default region in add_region

Check and update default region in add_region if none set.
This commit is contained in:
Peter
2018-12-14 10:29:10 +08:00
parent 33a388eff7
commit 917a0e282c
+5
View File
@@ -519,6 +519,11 @@ class block_manager {
}
}
$this->regions[$region] = 1;
// Checking the actual property instead of calling get_default_region as it ends up in a recursive call.
if (empty($this->defaultregion)) {
$this->set_default_region($region);
}
}
/**