mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
more diagnostics in has_capability() - number instead of context object detected and debug message displayed
This commit is contained in:
parent
403ba37a35
commit
5fe9a11d96
@ -306,6 +306,10 @@ function has_capability($capability, $context=NULL, $userid=NULL, $doanything=tr
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_object($context)) {
|
||||
debugging('Incorrect context parameter "'.$context.'" for has_capability(), object expected! This should be fixed in code.');
|
||||
}
|
||||
|
||||
if ($doanything) {
|
||||
|
||||
// Check site
|
||||
|
Loading…
x
Reference in New Issue
Block a user