mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 02:14:45 +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
8df1d79e59
commit
86d1ee0e35
@ -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