mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
FIxed another ossible notice during upgrade
This commit is contained in:
parent
abaeae30f7
commit
10f5c89035
@ -123,7 +123,7 @@ function has_capability($capability, $context=NULL, $userid=NULL) {
|
||||
if ($userid && $userid != $USER->id) { // loading other user's capability
|
||||
$capabilities = load_user_capability($capability, $context, $userid);
|
||||
} else {
|
||||
$capabilities = $USER->capabilities;
|
||||
$capabilities = empty($USER->capabilities) ? NULL : $USER->capabilities;
|
||||
}
|
||||
|
||||
if (empty($context)) { // Use default CONTEXT if none specified
|
||||
|
Loading…
x
Reference in New Issue
Block a user