diff --git a/addressbook/csv_import.php b/addressbook/csv_import.php index accdb1772e..6536c2516c 100644 --- a/addressbook/csv_import.php +++ b/addressbook/csv_import.php @@ -90,7 +90,8 @@ return ''; } - foreach(split('[,;]',$cats) as $cat) + $ids = array(); + foreach(split(' *[,;] *',$cats) as $cat) { if(isset($cat2id[$cat])) {