Permalink
Browse files

Merge branch 'MDL-30655-m22' of git://github.com/sammarshallou/moodle…

… into MOODLE_22_STABLE
  • Loading branch information...
nebgor committed Dec 13, 2011
2 parents 26ebc41 + cff596e commit 3a353b12baa0a02e743b92fd79f41108e5b3515a
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/blocklib.php
View
@@ -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);

0 comments on commit 3a353b1

Please sign in to comment.