From 8ff8fffc17d78d073e94b142b230c445de7d82f1 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 11 Mar 2015 08:59:54 -0400
Subject: [PATCH] Tolerate missing int_curr_symbol in locale information. -
 Useful, for example, in Ubuntu, when a locale has not yet been created with
 locale-gen.

---
 module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php
index 1435b07a7fb..79b47112e2a 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php
@@ -69,9 +69,9 @@ class SafeMoneyFormat extends AbstractHelper
         if (null === $defaultCurrency) {
             $localeInfo = localeconv();
             $defaultCurrency = isset($localeInfo['int_curr_symbol'])
-                ? $localeInfo['int_curr_symbol'] : 'USD';
+                ? trim($localeInfo['int_curr_symbol']) : '';
         }
-        $this->defaultCurrency = trim($defaultCurrency);
+        $this->defaultCurrency = empty($defaultCurrency) ? 'USD' : $defaultCurrency;
     }
 
     /**
-- 
GitLab