Fix PHP notice when validating profile forms with action "delete"

This commit is contained in:
Jens Schuppe 2020-01-16 10:39:50 +01:00
parent 08e9418766
commit f746a3fe06

View file

@ -364,6 +364,7 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
// Validate custom field mapping.
try {
if (isset($values['custom_field_mapping'])) {
$custom_field_mapping = preg_split('/\r\n|\r|\n/', $values['custom_field_mapping'], -1, PREG_SPLIT_NO_EMPTY);
if (!is_array($custom_field_mapping)) {
throw new Exception(
@ -419,6 +420,7 @@ class CRM_Twingle_Form_Profile extends CRM_Core_Form {
}
}
}
}
catch (Exception $exception) {
$errors['custom_field_mapping'] = $exception->getMessage();
}