I'm running civiCRM 5.17.5 under Joomla 3.9.12
When I select a specific smart group with a saved field mapping for export, and select "Exclude contacts with "do not mail" privacy, no street address, or who are deceased.",
I get the error (note the error doesn't appear if I don't select Exclude contacts...):
Error#8247
message => string(27) "Cannot unset string offsets"string => string(0) ""
code => 0
file => string(102) "/home/fcwm/public_html/administrator/components/com_civicrm/civicrm/CRM/Export/BAO/ExportProcessor.php"
line => 176
trace => array (20)
previous => NULL
Cannot unset string offsets
.../administrator/components/com_civicrm/civicrm/CRM/Export/BAO/ExportProcessor.php:176
171 public function setAdditionalFieldsForPostalExport() {
172 if ($this->getRequestedFields() && $this->isPostalableOnly()) {
173 $fields = ['is_deceased', 'do_not_mail', 'street_address', 'supplemental_address_1'];
174 foreach ($fields as $index => $field) {
175 if (!empty($this->getReturnProperties()[$field])) {
176 unset($field[$index]);
177 }
178 }
179 $this->additionalFieldsForPostalExport = array_fill_keys($fields, 1);
180 }
181 }
This error wasn't occurring prior to upgrading to 5.17.5
It doesn't happen with all my Saved field mappings, just one of them (but one I've been using for a few years without issue).