]> git.mjollnir.org Git - moodle.git/commitdiff
Fix to a bug preventing rss feeds from displaying.
authorscyrma <scyrma>
Fri, 16 Nov 2007 03:34:05 +0000 (03:34 +0000)
committerscyrma <scyrma>
Fri, 16 Nov 2007 03:34:05 +0000 (03:34 +0000)
lib/accesslib.php

index bc1356d0bfd43de5021eff24276e974380708b56..13c371b698c873b357dae2cbeda4e39224176fae 100755 (executable)
@@ -364,7 +364,12 @@ function has_capability($capability, $context, $userid=NULL, $doanything=true) {
 
     // Load dirty contexts list if needed
     if (!isset($DIRTYCONTEXTS)) {
-        $DIRTYCONTEXTS = get_dirty_contexts($USER->access['time']);
+        if (isset($USER->access['time'])) {
+            $DIRTYCONTEXTS = get_dirty_contexts($USER->access['time']);
+        }
+        else {
+            $DIRTYCONTEXTS = array();
+        }
     }
 
     // Careful check for staleness...