X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock%2Fblock.module;h=28fd7b30c6319635cdcdc12ac2e1d571501a4cc5;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=ee6a4a11ea536836ee34acb29c87fc87ca669fd0;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/block/block.module b/web/core/modules/block/block.module index ee6a4a11e..28fd7b30c 100644 --- a/web/core/modules/block/block.module +++ b/web/core/modules/block/block.module @@ -145,7 +145,11 @@ function block_rebuild() { // Disable blocks in invalid regions. if (!isset($regions[$block->getRegion()])) { if ($block->status()) { - drupal_set_message(t('The block %info was assigned to the invalid region %region and has been disabled.', ['%info' => $block_id, '%region' => $block->getRegion()]), 'warning'); + \Drupal::messenger() + ->addWarning(t('The block %info was assigned to the invalid region %region and has been disabled.', [ + '%info' => $block_id, + '%region' => $block->getRegion(), + ])); } $block ->setRegion(system_default_region($theme))