mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
FIxed another ossible notice during upgrade
This commit is contained in:
parent
abaeae30f7
commit
10f5c89035
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ function has_capability($capability, $context=NULL, $userid=NULL) {
|
||||||
if ($userid && $userid != $USER->id) { // loading other user's capability
|
if ($userid && $userid != $USER->id) { // loading other user's capability
|
||||||
$capabilities = load_user_capability($capability, $context, $userid);
|
$capabilities = load_user_capability($capability, $context, $userid);
|
||||||
} else {
|
} else {
|
||||||
$capabilities = $USER->capabilities;
|
$capabilities = empty($USER->capabilities) ? NULL : $USER->capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($context)) { // Use default CONTEXT if none specified
|
if (empty($context)) { // Use default CONTEXT if none specified
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue