Merge branch 'MDL-77430_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE
This commit is contained in:
@@ -1651,7 +1651,7 @@ class core_plugin_manager {
|
||||
}
|
||||
|
||||
// To be able to remove the plugin folder, its parent must be writable, too.
|
||||
if (!is_writable(dirname($pluginfo->rootdir))) {
|
||||
if (!isset($pluginfo->rootdir) || !is_writable(dirname($pluginfo->rootdir))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -598,6 +598,10 @@ abstract class base {
|
||||
public function get_dir() {
|
||||
global $CFG;
|
||||
|
||||
if (!isset($pluginfo->rootdir)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return substr($this->rootdir, strlen($CFG->dirroot));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user