mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
check if $name is already a country-code, before attempting to find a matching one, which can fail in certain areas of setup
This commit is contained in:
parent
89f46c6a3b
commit
19dcc2e654
@ -387,6 +387,11 @@ class country
|
||||
{
|
||||
if (!$name) return ''; // nothing to do
|
||||
|
||||
if (strlen($name) == 2 && isset($this->country_array[$name]))
|
||||
{
|
||||
return $name; // $name is already a country-code
|
||||
}
|
||||
|
||||
if (($code = array_search(strtoupper($name),$this->country_array)) !== false)
|
||||
{
|
||||
return $code;
|
||||
|
Loading…
Reference in New Issue
Block a user