summaryrefslogtreecommitdiffstats
path: root/core/modules/block/block.module
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/block/block.module')
-rw-r--r--core/modules/block/block.module6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index ee6a4a1..28fd7b3 100644
--- a/core/modules/block/block.module
+++ b/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))