2

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).

2 Answers 2

2

This was fixed in today's release (5.18.1)

0

To me this looks like a typo in the code and line 176 should be unset($fields[$index]) (plural fields).

https://lab.civicrm.org/dev/core/issues/1292

https://github.com/civicrm/civicrm-core/pull/15392

Note that to trigger it you have to check that checkbox and also have one of the affected fields in your export mapping, like "Street Address".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.