Commit be6406d0 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) fix some more php notices

parent 3b707f08
......@@ -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