diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 5e1443d..56be0c8 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1239,16 +1239,14 @@ function system_update_8001() { } // Sort blocks by block weight. uasort($blocks, function ($a, $b) { - $weight = $a->get('weight') - $b->get('weight'); - return $weight; + return $a->get('weight') - $b->get('weight'); }); // Move blocks to content region and set them in right order by their // weight. foreach ($blocks as $block) { $block->set('region', 'content'); - $block->set('weight', $weight); + $block->set('weight', $weight++); $block->save(); - $weight++; } break;