diff --git a/enrol/fee/classes/plugin.php b/enrol/fee/classes/plugin.php index 78cbbcd454621..549247cd7a0ae 100644 --- a/enrol/fee/classes/plugin.php +++ b/enrol/fee/classes/plugin.php @@ -45,6 +45,10 @@ public function get_possible_currencies(): array { $currencies[$c] = new lang_string($c, 'core_currencies'); } + uasort($currencies, function($a, $b) { + return strcmp($a, $b); + }); + return $currencies; } diff --git a/payment/classes/helper.php b/payment/classes/helper.php index f0792b1c932a1..b5dc3c17471d0 100644 --- a/payment/classes/helper.php +++ b/payment/classes/helper.php @@ -49,7 +49,7 @@ public static function get_supported_currencies(): array { /** @var \paygw_paypal\gateway $classname */ $classname = '\paygw_' . $plugin . '\gateway'; - $currencies += component_class_callback($classname, 'get_supported_currencies', [], []); + $currencies = array_merge($currencies, component_class_callback($classname, 'get_supported_currencies', [], [])); } $currencies = array_unique($currencies);