MDL-30655 Blocks: Moving block to top of list can cause (harmless) PHP warnings
This commit is contained in:
committed by
Aparup Banerjee
parent
cc8f03e067
commit
78e5c3600d
+4
-2
@@ -1457,8 +1457,10 @@ class block_manager {
|
||||
} else {
|
||||
$newweight = ceil($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);
|
||||
|
||||
Reference in New Issue
Block a user