Merge branch 'MDL-49389_28' of git://github.com/timhunt/moodle into MOODLE_28_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2015-03-17 00:29:22 +01:00
+4 -2
View File
@@ -1599,8 +1599,10 @@ class block_manager {
if ($bestgap < $newweight) {
$newweight = floor($newweight);
for ($weight = $bestgap + 1; $weight <= $newweight; $weight++) {
foreach ($usedweights[$weight] as $biid) {
$this->reposition_block($biid, $newregion, $weight - 1);
if (array_key_exists($weight, $usedweights)) {
foreach ($usedweights[$weight] as $biid) {
$this->reposition_block($biid, $newregion, $weight - 1);
}
}
}
$this->reposition_block($block->instance->id, $newregion, $newweight);