Issue #1957104 by alexpott: Fixed Empty regions displayed even though they're empty.
parent
7f621ed0ee
commit
1fb4c7e15d
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue