From e0c5c5e9746206894bd114c454411b3a208bd689 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Fri, 1 Jul 2005 17:21:52 +0000 Subject: [PATCH] Remove potential PHP notices when $course is not an object. --- lib/moodlelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 8dc1616dc03..339f4ce8d46 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -4384,7 +4384,7 @@ function get_string($identifier, $module='', $a=NULL) { global $course; /// Not a nice hack, but quick if (empty($CFG->courselang)) { - if (isset($course->lang)) { + if (is_object($course) and isset($course->lang)) { $CFG->courselang = $course->lang; } }