Issue #1957104 by alexpott: Fixed Empty regions displayed even though they're empty.

8.0.x
webchick 2013-04-11 23:57:55 -07:00
parent 7f621ed0ee
commit 1fb4c7e15d
2 changed files with 2 additions and 1 deletions

View File

@ -350,7 +350,7 @@ function _block_get_renderable_region($list = array()) {
// skip the help block, since we assume that most users do not need or want
// to perform contextual actions on the help block, and the links needlessly
// draw attention on it.
if (!in_array($block->get('plugin'), array('system_help_block', 'system_main_block'))) {
if (isset($build[$key]) && !in_array($block->get('plugin'), array('system_help_block', 'system_main_block'))) {
$build[$key]['#contextual_links']['block'] = array('admin/structure/block/manage', array($key));
}
}

View File

@ -59,6 +59,7 @@ class BlockTest extends BlockTestBase {
// Confirm that an empty block is not displayed.
$this->assertNoText('Powered by Drupal', 'Empty block not displayed.');
$this->assertNoRaw('sidebar-first', 'Empty sidebar-first region is not displayed.');
}
/**