Merge pull request #16419 from civicrm/5.22
[civicrm-core.git] / CRM / Core / PseudoConstant.php
index 99316fada86608698370556b9f7a43f4c35b90a8..255594e4659fb8f5eaa5c1c91d5744c8f097a9b4 100644 (file)
@@ -358,7 +358,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);