MDL-42648 lib: Clean theme throws exception if set_pagelayout is called too late.

This commit is contained in:
Mary Evans 2013-11-02 00:43:48 +00:00
parent 5386f0bbfe
commit 0664129b46

View File

@ -3199,7 +3199,12 @@ EOD;
'data-blockregion' => $displayregion,
'data-droptarget' => '1'
);
return html_writer::tag($tag, $this->blocks_for_region($region), $attributes);
if ($this->page->blocks->region_has_content($region, $this)) {
$content = $this->blocks_for_region($region);
} else {
$content = '';
}
return html_writer::tag($tag, $content, $attributes);
}
/**