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:
moodler 2002-12-29 17:32:32 +00:00
parent a900458749
commit 9c9f7d7790
28 changed files with 1600 additions and 65 deletions

View file

@ -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
}