Commit 41265470 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) fix some more php notices

parent 242e3212
......@@ -2,13 +2,13 @@
function system_get_language_code() {
global $config;
$code = "en-US"; // Set default code.
// a language code, as per [RFC3066]
$language = $config['system']['language'];
$code = str_replace("_", "-", $language);
if (empty($code))
$code = "en-US"; // Set default code.
if (isset($config['system']['language'])) {
$language = $config['system']['language'];
$code = str_replace("_", "-", $language);
}
return $code;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment