Answers.Body: <p>Per comment above the fix was part of CiviCRM 4.7.23 and hence the solution is to upgrade to the latest version where it is fixed. </p>
  
  <p>( I keep seeing issues bumped, presumably by a bot where it is a long-fixed bug &amp; no longer relevant)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-07T20:54:12.880Z
Answers.Text: If a Question doesn't get any upvoted or accepted answers then it keeps coming back to the surface. I am going to edit your A by adding J's link and hopefully it will get some upvotes and  Karen S will Accept it.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-07T06:53:48.337Z
Answers.LastActivityDate: 2018-06-07T20:54:48.780Z
Answers.LastEditDate: 2018-06-07T20:54:48.780Z
Answers.UserDisplayName: user4278
Answers.Body: <p>I just discovered this same issue today on WP 4.8.1 CiviCRM 4.7.22. Examining the code at line 704, I made the edit to treat $newContact['error_message']['params'][0] as an array instead of a comma-separated list. I see that is also the proposed fix in CRM-20739 that Karen S references. I was worried that my quick hack might break something else, until I checked in here. Will this be fixed in an upcoming CiviCRM update?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-09T23:52:49.057Z
Answers.Text: For later visitors - this fix is part of CiviCRM 4.7.23+.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-09T22:44:11.770Z
Answers.LastActivityDate: 2017-09-09T22:44:11.770Z
Answers.UserDisplayName: Karl Rudnick
Body: <p>I am getting the following warnings when trying to import contacts:</p>
  
  <p>Warning: explode() expects parameter 2 to be string, array given in //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php on line 704</p>
  
  <p>Warning: array_pop() expects parameter 1 to be array, null given in //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php on line 706</p>
  
  <p>Warning: Cannot modify header information - headers already sent by (output started at //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php:704) in //wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 912</p>
  
  <p>At first I thought there were unseen characters in the csv file but determined it only complains on contacts that already exist.  It appears to update the matching contact but does not add the contact to the specified group on import and it creates a strange log in the matching contact's record with references to other contacts in the import!</p>
  
  <p>The comment above this section of code in lines 704-706 refers to "CRM-10433 - might return comma separate list of all dupes".  The Jira title of this issue is: import fails when updating on duplicate, adding to group, and multiple duplicates exist (related!?!?)</p>
  
  <p>I am deduping on Name and Email using the Update option although the error also occurs on Fill. I am running 4.7.19 in WP and I upgraded recently from 4.6.20 where the client did not have this problem.</p>
  
  <p>Is this fix from 4.2 no longer compatible with 4.7.x!?!?  </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-16T02:52:49.597Z
Comments.Text: I have reproduced on the civicrm demo site :/
Comments.UserDisplayName: Karen S
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-30T12:48:32.750Z
Comments.Text: Fixed https://issues.civicrm.org/jira/browse/CRM-20739
Comments.UserDisplayName: Karen S
Tags: <contacts><import><duplicate-contacts>
Title: Contact Import explode issue with matching contacts
ThreadText: # Contact Import explode issue with matching contacts
  
  (Asked by: username_0 on 2017-06-14)
  
  I am getting the following warnings when trying to import contacts:
  
  Warning: explode() expects parameter 2 to be string, array given in //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php on line 704
  
  Warning: array\_pop() expects parameter 1 to be array, null given in //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php on line 706
  
  Warning: Cannot modify header information - headers already sent by (output started at //wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Parser/Contact.php:704) in //wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 912
  
  At first I thought there were unseen characters in the csv file but determined it only complains on contacts that already exist. It appears to update the matching contact but does not add the contact to the specified group on import and it creates a strange log in the matching contact's record with references to other contacts in the import!
  
  The comment above this section of code in lines 704-706 refers to "CRM-10433 - might return comma separate list of all dupes". The Jira title of this issue is: import fails when updating on duplicate, adding to group, and multiple duplicates exist (related!?!?)
  
  I am deduping on Name and Email using the Update option although the error also occurs on Fill. I am running 4.7.19 in WP and I upgraded recently from 4.6.20 where the client did not have this problem.
  
  Is this fix from 4.2 no longer compatible with 4.7.x!?!?
  
  **Tags:** contacts, import, duplicate-contacts
  
  > **Comments:**
  > **username_0**: I have reproduced on the civicrm demo site :/  
  > **username_0**: Fixed https://issues.civicrm.org/jira/browse/CRM-20739  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-06-07. Score: 1
  
  Per comment above the fix was part of CiviCRM 4.7.23 and hence the solution is to upgrade to the latest version where it is fixed.
  
  ( I keep seeing issues bumped, presumably by a bot where it is a long-fixed bug & no longer relevant)
  
  > **Comments:**
  > **username_2**: If a Question doesn't get any upvoted or accepted answers then it keeps coming back to the surface. I am going to edit your A by adding J's link and hopefully it will get some upvotes and  username_0 will Accept it.  
  
  ---
  
  ### Answer by username_3 on 2017-09-09. Score: 0
  
  I just discovered this same issue today on WP 4.8.1 CiviCRM 4.7.22. Examining the code at line 704, I made the edit to treat $newContact['error\_message']['params'][0] as an array instead of a comma-separated list. I see that is also the proposed fix in CRM-20739 that username_0 references. I was worried that my quick hack might break something else, until I checked in here. Will this be fixed in an upcoming CiviCRM update?
  
  > **Comments:**
  > **username_4**: For later visitors - this fix is part of CiviCRM 4.7.23+.  
  
  ---
  
  