diff --git a/core/modules/language/language.negotiation.inc b/core/modules/language/language.negotiation.inc index a16dbe82ce5a2e932ec10fbc1c7566d780091657..63c8c1363af4b1dc35dc65f390c16ce71c2a4253 100644 --- a/core/modules/language/language.negotiation.inc +++ b/core/modules/language/language.negotiation.inc @@ -223,7 +223,8 @@ function language_from_url($languages) { // Get only the host, not the port. $http_host= $_SERVER['HTTP_HOST']; if (strpos($http_host, ':') !== FALSE) { - $http_host = current(explode(':', $http_host)); + $http_host_tmp = explode(':', $http_host); + $http_host = current($http_host_tmp); } $domains = language_negotiation_url_domains(); foreach ($languages as $language) {