Merge pull request #21438 from colemanw/fixApi4GetDefaults
[civicrm-core.git] / CRM / Core / PseudoConstant.php
index 9e84516231bea54030beb85657984e630c712d24..494201eaa68fd2f587ad0448e2ea8c5865ad1554 100644 (file)
@@ -1513,8 +1513,8 @@ WHERE  id = %1
     }
 
     // Use abbrColum if context is abbreviate
-    if ($context === 'abbreviate' && (in_array('abbreviation', $availableFields) || !empty($pseudoconstant['abbrColumn']))) {
-      $params['labelColumn'] = $pseudoconstant['abbrColumn'] ?? 'abbreviation';
+    if ($context === 'abbreviate' && !empty($pseudoconstant['abbrColumn'])) {
+      $params['labelColumn'] = $pseudoconstant['abbrColumn'];
     }
 
     // Condition param can be passed as an sql clause string or an array of clauses