From daa01cd95af746a65b9f8e258d6638a57ec4a4de Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 13 Aug 2014 05:19:48 +0200 Subject: Don't bail out if a json file doesn't exist for a given lang+template --- inc/dictionary.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/dictionary.inc.php') diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php index b8a888d5..3a157555 100644 --- a/inc/dictionary.inc.php +++ b/inc/dictionary.inc.php @@ -54,10 +54,10 @@ class Dictionary if ($lang === false) $lang = LANG; $file = "lang/" . $lang . "/" . $template . ".json"; - $content = @file_get_contents($file); - if ($content === false) - Util::traceError("Could not find language file $template for language $lang"); $language = array('lang' => $lang); + $content = @file_get_contents($file); + if ($content === false) // File does not exist for language + return $language; $json = json_decode($content, true); if (!is_array($json)) return $language; -- cgit v1.2.3-55-g7522