MDL-8270 ignore blocks that can not be instantiated; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-03-30 14:36:27 +00:00
parent 2093b6e8b0
commit 4a80e5cb05

View File

@ -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);
}
}
}