aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--langs.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/langs.inc.php b/langs.inc.php
index aae94b38c..bd6af3bda 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -471,7 +471,12 @@ function read_translation_file($locale, $name_of_translation)
if ($locale == 'en') {
$path_filename .= 't';
}
- return phpmo_parse_po_file(G_APP_ROOT . $path_filename);
+ $dictionary_from_file = phpmo_parse_po_file(G_APP_ROOT . $path_filename);
+ if (is_array($dictionary_from_file)) {
+ return $dictionary_from_file;
+ } else {
+ return array(); // in case of missing l10n file or it's parsing error
+ }
}
}