MDL-22019 fixed notices caused by deleting blocks without unisntalling
authorPetr Skoda <skodak@moodle.org>
Fri, 2 Apr 2010 08:26:59 +0000 (08:26 +0000)
committerPetr Skoda <skodak@moodle.org>
Fri, 2 Apr 2010 08:26:59 +0000 (08:26 +0000)
admin/settings/plugins.php

index 0a843e2..4d2c950 100644 (file)
@@ -45,6 +45,9 @@ if ($hassiteconfig) {
         $blockbyname = array();
 
         foreach ($blocks as $block) {
         $blockbyname = array();
 
         foreach ($blocks as $block) {
+            if (!file_exists("$CFG->dirroot/blocks/$block->name")) {
+                continue;
+            }
             if(($blockobject = block_instance($block->name)) === false) {
                 // Failed to load
                 continue;
             if(($blockobject = block_instance($block->name)) === false) {
                 // Failed to load
                 continue;