fix check for existing identity for first array element

This commit is contained in:
Ralf Becker 2016-10-31 15:56:41 +01:00
parent 4d62d34fac
commit 96b39eefe6

View File

@ -409,7 +409,7 @@ function do_edit_mail($type, array $arg0s)
// check if user allready has an identity created for given aliases
foreach(Api\Mail\Account::identities($account, false, 'ident_email', $account_id) as $email)
{
if (($key = array_search($email, $args)))
if (($key = array_search($email, $args)) !== false)
{
unset($args[$key]);
}