Commit 1fb4c7e1 authored by webchick's avatar webchick
Browse files

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

parent 7f621ed0
......@@ -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 @@ function testBlockVisibility() {
// 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.');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment