mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merge branch 'MDL-77430' of https://github.com/stronk7/moodle
This commit is contained in:
commit
675dadaf55
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user