mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Remove potential PHP notices when $course is not an object.
This commit is contained in:
parent
61c2a9f3c5
commit
e0c5c5e974
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user