aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-10-24 16:33:58 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-10-26 01:21:43 +0200
commitfe5f1e4d67d999ed3c6ef78dc4d49f5dd1a93056 (patch)
treee5c924b4028e4ed0b3589e06850f03108e110c89 /include
parenta782c9944c7ddefd0bbe7458350b2417aabe64ad (diff)
downloadvolse-hubzilla-fe5f1e4d67d999ed3c6ef78dc4d49f5dd1a93056.tar.gz
volse-hubzilla-fe5f1e4d67d999ed3c6ef78dc4d49f5dd1a93056.tar.bz2
volse-hubzilla-fe5f1e4d67d999ed3c6ef78dc4d49f5dd1a93056.zip
:white_check_mark: Some unit test for include/language.php
Unfortunately not so much unit testable, but added in preparation to update LanguageDetect and Intl library.
Diffstat (limited to 'include')
-rw-r--r--include/language.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/language.php b/include/language.php
index efe9397fb..a59823757 100644
--- a/include/language.php
+++ b/include/language.php
@@ -322,6 +322,8 @@ function get_language_name($s, $l = null) {
$language = $languageRepository->get($s, $l);
} catch (CommerceGuys\Intl\Exception\UnknownLanguageException $e) {
return $s; // Give up
+ } catch (CommerceGuys\Intl\Exception\UnknownLocaleException $e) {
+ return $s; // Give up
}
}