Skip to content

Commit

Permalink
Merge branch 'MDL-30655-m22' of git://github.com/sammarshallou/moodle…
Browse files Browse the repository at this point in the history
… into MOODLE_22_STABLE
  • Loading branch information
Aparup Banerjee committed Dec 13, 2011
2 parents 26ebc41 + cff596e commit 3a353b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/blocklib.php
Expand Up @@ -1467,8 +1467,10 @@ public function process_url_move() {
} 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);
Expand Down

0 comments on commit 3a353b1

Please sign in to comment.