Skip to content

Commit

Permalink
Merge pull request #22840 from braders/prefered-language-undefined-va…
Browse files Browse the repository at this point in the history
…riable

Remove reference to undefined variable in CRM_Contact_Form_Inline_CommunicationPreferences
  • Loading branch information
demeritcowboy authored Feb 27, 2022
2 parents bb62803 + 8e5fd43 commit 134c71f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions CRM/Contact/Form/Inline/CommunicationPreferences.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ public function setDefaultValues() {
$defaults['preferred_language'] = CRM_Utils_Array::key($defaults['preferred_language'], $languages);
}

// CRM-7119: set preferred_language to default if unset
if (empty($defaults['preferred_language'])) {
if ($form->_action == CRM_Core_Action::ADD) {
if (($defContactLanguage = CRM_Core_I18n::getContactDefaultLanguage()) != FALSE) {
$defaults['preferred_language'] = $defContactLanguage;
}
}
}

// CRM-19135: where CRM_Core_BAO_Contact::getValues() set label as a default value instead of reserved 'value',
// the code is to ensure we always set default to value instead of label
if (!empty($defaults['preferred_mail_format'])) {
Expand Down

0 comments on commit 134c71f

Please sign in to comment.