summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gallery/libraries/Gallery_I18n.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gallery/libraries/Gallery_I18n.php b/modules/gallery/libraries/Gallery_I18n.php
index 0e9c0bdc..f1e77744 100644
--- a/modules/gallery/libraries/Gallery_I18n.php
+++ b/modules/gallery/libraries/Gallery_I18n.php
@@ -166,7 +166,8 @@ class Gallery_I18n_Core {
$cache_key = "translation|" . $locale;
$cache = Cache::instance();
$translations = $cache->get($cache_key);
- if (empty($translations)) {
+ if (!isset($translations) || !is_array($translations)) {
+ $translations = array();
foreach (db::build()
->select("key", "translation")
->from("incoming_translations")