mirror of
https://github.com/moodle/moodle.git
synced 2025-04-12 03:52:16 +02:00
Merge branch 'MDL-77930-401' of https://github.com/rjnl/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
071adb2fb1
@ -2646,7 +2646,7 @@ function get_capability_string($capabilityname) {
|
||||
}
|
||||
|
||||
$dir = core_component::get_component_directory($component);
|
||||
if (!file_exists($dir)) {
|
||||
if (!isset($dir) || !file_exists($dir)) {
|
||||
// plugin broken or does not exist, do not bother with printing of debug message
|
||||
return $capabilityname.' ???';
|
||||
}
|
||||
@ -2670,7 +2670,7 @@ function get_component_string($component, $contextlevel) {
|
||||
|
||||
list($type, $name) = core_component::normalize_component($component);
|
||||
$dir = core_component::get_plugin_directory($type, $name);
|
||||
if (!file_exists($dir)) {
|
||||
if (!isset($dir) || !file_exists($dir)) {
|
||||
// plugin not installed, bad luck, there is no way to find the name
|
||||
return $component . ' ???';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user