]> git.mjollnir.org Git - moodle.git/commitdiff
If a block is unknown then ignore it rather than throwing fatal error. In future...
authorgustav_delius <gustav_delius>
Wed, 24 Nov 2004 09:16:39 +0000 (09:16 +0000)
committergustav_delius <gustav_delius>
Wed, 24 Nov 2004 09:16:39 +0000 (09:16 +0000)
lib/blocklib.php

index 59af30d340c838d1843eb703b9750930faee4767..3d26dee807366919783fa33b3aa079adeff25443 100644 (file)
@@ -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;