mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-8270 ignore blocks that can not be instantiated; merged from MOODLE_19_STABLE
This commit is contained in:
parent
2093b6e8b0
commit
4a80e5cb05
@ -119,8 +119,9 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
|
||||
|
||||
if ($blocks = get_records('block', 'visible', 1)) {
|
||||
foreach ($blocks as $block) {
|
||||
$blockobject = block_instance($block->name);
|
||||
$blockobject->decode_content_links_caller($restore);
|
||||
if ($blockobject = block_instance($block->name)) {
|
||||
$blockobject->decode_content_links_caller($restore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user