diff options
author | Andy Staudacher <andy.st@gmail.com> | 2010-02-23 10:02:27 -0800 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2010-02-23 10:02:27 -0800 |
commit | 6afc5ccf5c5d70b3aef4024f892141a07779c25f (patch) | |
tree | fd8d924c493f2cb29b0dbdeb1415f1555f9de2e3 /modules | |
parent | 5f97c12562ed9ce6869c85ed5ce1abc33580ede0 (diff) |
Fix translation cache for installations with 0 translations in the DB.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/libraries/Gallery_I18n.php | 3 |
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") |