From: gustav_delius Date: Wed, 24 Nov 2004 09:16:39 +0000 (+0000) Subject: If a block is unknown then ignore it rather than throwing fatal error. In future... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ab0e4dd42f433a5b0ed501c0a3daebc108ed1941;p=moodle.git If a block is unknown then ignore it rather than throwing fatal error. In future one might want to have a dummy block that is displayed in this case to alert the user to the fact that some block code is missing. --- diff --git a/lib/blocklib.php b/lib/blocklib.php index 59af30d340..3d26dee807 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -198,7 +198,10 @@ function blocks_print_group(&$page, &$instances) { continue; } - $obj = block_instance($block->name, $instance); + if (!$obj = block_instance($block->name, $instance)) { + // Invalid block + continue; + } if ($isediting) { $options = 0;