Skip to content
Code-Schnipsel Gruppen Projekte
Commit f66de536 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'next' into 'master'

Next

See merge request !32
Übergeordnete 823c0604 c7323cb3
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
3 Merge Requests!52Update 'next-3.x' with latest changes from 'main',!48Add QUIQQER Tooling,!32Next
Pipeline-Nr. 4994 bestanden
...@@ -297,20 +297,24 @@ public static function getUserCurrencyByCountry($User = null): ?Currency ...@@ -297,20 +297,24 @@ public static function getUserCurrencyByCountry($User = null): ?Currency
* Return all allowed currencies * Return all allowed currencies
* *
* @return Currency[] - [Currency, Currency, Currency] * @return Currency[] - [Currency, Currency, Currency]
* @throws QUI\Exception
*/ */
public static function getAllowedCurrencies(): array public static function getAllowedCurrencies(): array
{ {
$Config = QUI::getPackage('quiqqer/currency')->getConfig(); try {
$allowed = $Config->getValue('currency', 'allowedCurrencies'); $Config = QUI::getPackage('quiqqer/currency')->getConfig();
$allowed = $Config->getValue('currency', 'allowedCurrencies');
$allowed = explode(',', trim($allowed)); $allowed = explode(',', trim($allowed));
$list = []; $list = [];
$default = self::getDefaultCurrency()->getCode(); $default = self::getDefaultCurrency()->getCode();
if (!in_array($default, $allowed)) { if (!in_array($default, $allowed)) {
$allowed[] = $default; $allowed[] = $default;
}
} catch (QUI\Exception $e) {
QUI\System\Log::addError($e->getMessage());
return [];
} }
foreach ($allowed as $currency) { foreach ($allowed as $currency) {
...@@ -579,7 +583,7 @@ public static function getCurrencyTypes(): array ...@@ -579,7 +583,7 @@ public static function getCurrencyTypes(): array
]; ];
} }
} catch (QUI\Exception $Exception) { } catch (QUI\Exception $Exception) {
QUI\System\Log::writeException($Exception); QUI\System\Log::addNotice($Exception->getMessage());
} }
} }
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren