* Addressbook - Fix incorrect validation error from contact owner when editing import definition

This commit is contained in:
nathangray 2018-06-21 09:44:12 -06:00
parent 32999ee231
commit 36a1d84c48

View File

@ -120,7 +120,7 @@ class addressbook_wizard_import_contacts_csv extends importexport_wizard_basic_i
$bocontacts = new Api\Contacts();
$sel_options['contact_owner'] = array('personal' => lang("Importer's personal")) + $bocontacts->get_addressbooks(Acl::ADD);
if(!in_array($content['contact_owner'], $sel_options['contact_owner']))
if(!array_key_exists($content['contact_owner'], $sel_options['contact_owner']))
{
$sel_options['contact_owner'][$content['contact_owner']] = lang("'%1' is not allowed ('%2')!", $content['contact_owner'], implode(',',array_keys($sel_options['contact_owner'])));
}