summaryrefslogtreecommitdiff
path: root/modules/locale.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/locale.module')
-rw-r--r--modules/locale.module5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/locale.module b/modules/locale.module
index a726fc6c3..8dfccad47 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -282,7 +282,10 @@ function locale($string) {
static $locale_t;
if (!isset($locale_t)) {
- $locale_t = unserialize(cache_get("locale:$locale"));
+ $cache = cache_get("locale:$locale");
+ if ($cache) {
+ $locale_t = unserialize($cache->data);
+ }
}
if ($locale_t[$string] != "") {