mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Various little fixes to remove warnings (usually about empty variables)
when error_reporting is turned up to 15 or so ... more of these to come ...
This commit is contained in:
parent
a900458749
commit
9c9f7d7790
28 changed files with 1600 additions and 65 deletions
|
@ -127,9 +127,9 @@
|
|||
/// then use the one from the default language. Otherwise (and this is the
|
||||
/// majority of cases), use the stored locale specified by admin.
|
||||
|
||||
if ($USER->lang and ($USER->lang != $CFG->lang) ) {
|
||||
if (!empty($USER->lang) and ($USER->lang != $CFG->lang) ) {
|
||||
$CFG->locale = get_string("locale");
|
||||
} else if (!$CFG->locale) {
|
||||
} else if (empty($CFG->locale)) {
|
||||
$CFG->locale = get_string("locale");
|
||||
set_config("locale", $CFG->locale); // cache it to save lookups in future
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue