CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2019-10-05T13:57:10Zhttps://lab.civicrm.org/dev/core/-/issues/1292Contact Export has fatal error if you check the box 'Exclude contacts with "d...2019-10-05T13:57:10ZDaveDContact Export has fatal error if you check the box 'Exclude contacts with "do not mail" privacy' AND the selected fields include "Do Not Mail"Gives "Error: Cannot unset string offsets".
I think this would also apply if you selected to export the fields is_deceased or street_address.
See https://civicrm.stackexchange.com/questions/33245/error-cannot-unset-string-offsets-expor...Gives "Error: Cannot unset string offsets".
I think this would also apply if you selected to export the fields is_deceased or street_address.
See https://civicrm.stackexchange.com/questions/33245/error-cannot-unset-string-offsets-exporting-using-custom-field-mapping
To reproduce:
1. Do contact search. For the purposes here make sure the search results have at least one contact with a street address, otherwise you'll trigger another issue which I'll post separately.
2. Select a couple or all just include at least one with a street address.
3. Choose export from the dropdown.
4. Choose selected fields.
5. Check the box that says `Exclude contacts with "do not mail" privacy etc...`.
6. On the next screen choose "Do Not Mail" as one of the fields.
7. When you export you get the fatal error.
Seems like a typo [here](https://github.com/civicrm/civicrm-core/blob/51d84eca30b49b72af285ef1435c7087c6c6cb7c/CRM/Export/BAO/ExportProcessor.php#L162). $fields is missing an "s".
Looks like it was introduced in 5.17.x. I marked as regression but I know people are busy at the sprint and this is an easy fix for anyone to make themselves.
https://github.com/civicrm/civicrm-core/pull/15392
~regression5.18.1DaveDDaveD