From e2629fc12d93ddc2ee6e2c96beb39feabe3f1efd Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Wed, 31 Aug 2005 06:13:13 +0000 Subject: [PATCH] Preventing another warning. In some cases in the calendar blocks, resource filtering gets called with no courseid --- mod/resource/filter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/resource/filter.php b/mod/resource/filter.php index 912216dc55e..63427bfe787 100644 --- a/mod/resource/filter.php +++ b/mod/resource/filter.php @@ -14,6 +14,11 @@ return $text; } + // if we don't have a courseid, we can't run the query, so + if (empty($courseid)) { + return $text; + } + /// Create a list of all the resources to search for. It may be cached already. if (empty($resourcelist)) {