Commit 4b0d7f55 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#202925 report by beholder, patch by myself: (notice fix) only consider...

#202925 report by beholder, patch by myself: (notice fix) only consider languages with a host set when comparing with the current host in domain language negotiation
parent 532f02b3
......@@ -21,7 +21,7 @@ function language_initialize() {
$languages = language_list();
foreach ($languages as $language) {
$parts = parse_url($language->domain);
if ($_SERVER['SERVER_NAME'] == $parts['host']) {
if (!empty($parts['host']) && ($_SERVER['SERVER_NAME'] == $parts['host'])) {
return $language;
}
}
......
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