]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib: mark_context_dirty() don't mark it there is no path
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:22:49 +0000 (07:22 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:22:49 +0000 (07:22 +0000)
lib/accesslib.php

index 7ff3b01fd97af48d438a3f5afae5bb166df81a31..344e80544498a1d6674f27a805d86c25ffed0a82 100755 (executable)
@@ -4975,8 +4975,11 @@ function get_dirty_contexts($time) {
  *
  */
 function mark_context_dirty($path) {
-    // Trivial (for now?)
-    set_config($path, time(), 'accesslib/dirtycontexts');
+
+    // only if it is a non-empty string
+    if (is_string($path) && $path !== '') {
+        set_config($path, time(), 'accesslib/dirtycontexts');
+    }
 }
 
 /*