MDL-36091 added debugging() calls in blocks of code marked as "should never happen"
This commit is contained in:
committed by
Dan Poltawski
parent
06d8f380e9
commit
c90e6b4644
@@ -393,6 +393,7 @@ function has_capability($capability, context $context, $user = null, $doanything
|
||||
if (!isset($USER->id)) {
|
||||
// should never happen
|
||||
$USER->id = 0;
|
||||
debugging('Capability check being performed on a user with no ID.', DEBUG_DEVELOPER);
|
||||
}
|
||||
|
||||
// make sure there is a real user specified
|
||||
@@ -2062,6 +2063,7 @@ function can_access_course(stdClass $course, $user = null, $withcapability = '',
|
||||
if (!isset($USER->id)) {
|
||||
// should never happen
|
||||
$USER->id = 0;
|
||||
debugging('Course access check being performed on a user with no ID.', DEBUG_DEVELOPER);
|
||||
}
|
||||
|
||||
// make sure there is a user specified
|
||||
|
||||
Reference in New Issue
Block a user