Country/Region PseudoConstant not sorted according to the locale
authorSamuel Vanhove <samuel@symbiotic.coop>
Thu, 9 Jan 2020 17:54:51 +0000 (12:54 -0500)
committerSamuel Vanhove <samuel@symbiotic.coop>
Thu, 9 Jan 2020 17:54:51 +0000 (12:54 -0500)
CRM/Core/PseudoConstant.php

index 14e2e7fcf220d826e9af4d437329f7fc442bc5cf..792a334fe95ef0f2ef2e435921d79ca545331180 100644 (file)
@@ -374,7 +374,7 @@ class CRM_Core_PseudoConstant {
             $i18n->localizeArray($output, $I18nParams);
             // Maintain sort by label
             if ($order == "ORDER BY %2") {
-              CRM_Utils_Array::asort($output);
+              $output = CRM_Utils_Array::asort($output);
             }
           }
           CRM_Utils_Hook::fieldOptions($entity, $fieldName, $output, $params);