Merge branch 'MDL-77430_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE

This commit is contained in:
Jun Pataleta
2023-03-01 23:59:28 +08:00
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -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;
}
+4
View File
@@ -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));
}