Skip to content

Commit

Permalink
Merge branch 'MDL-77930-master' of https://github.com/rjnl/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed May 16, 2023
2 parents cdbacb9 + f74f702 commit 9b64511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/accesslib.php
Expand Up @@ -2699,7 +2699,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.' ???';
}
Expand All @@ -2723,7 +2723,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 . ' ???';
}
Expand Down

0 comments on commit 9b64511

Please sign in to comment.