]> git.mjollnir.org Git - moodle.git/commitdiff
more diagnostics in has_capability() - number instead of context object detected...
authorskodak <skodak>
Mon, 2 Oct 2006 22:10:36 +0000 (22:10 +0000)
committerskodak <skodak>
Mon, 2 Oct 2006 22:10:36 +0000 (22:10 +0000)
lib/accesslib.php

index c1567fb876892b1f07741238685008e936eb6e98..f45a01adcd90851c443d8b33c26858f1e866e7c6 100755 (executable)
@@ -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