Skip to content

Commit

Permalink
MDL-30655 Blocks: Moving block to top of list can cause (harmless) PH…
Browse files Browse the repository at this point in the history
…P warnings
  • Loading branch information
sammarshallou committed Dec 9, 2011
1 parent acb3bf8 commit cff596e
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 { } else {
$newweight = ceil($newweight); $newweight = ceil($newweight);
for ($weight = $bestgap - 1; $weight >= $newweight; $weight--) { for ($weight = $bestgap - 1; $weight >= $newweight; $weight--) {
foreach ($usedweights[$weight] as $biid) { if (array_key_exists($weight, $usedweights)) {
$this->reposition_block($biid, $newregion, $weight + 1); foreach ($usedweights[$weight] as $biid) {
$this->reposition_block($biid, $newregion, $weight + 1);
}
} }
} }
$this->reposition_block($block->instance->id, $newregion, $newweight); $this->reposition_block($block->instance->id, $newregion, $newweight);
Expand Down

0 comments on commit cff596e

Please sign in to comment.