diff options
-rw-r--r-- | modules/locale.module | 2 | ||||
-rw-r--r-- | modules/locale/locale.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/locale.module b/modules/locale.module index 738dcfc17..18baa7dd6 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -340,7 +340,7 @@ function locale($string) { $locale_t = unserialize($cache->data); } - if (array_key_exists($string, $locale_t)) { + if (is_array($locale_t) && array_key_exists($string, $locale_t)) { $string = $locale_t[$string]; } else { diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 738dcfc17..18baa7dd6 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -340,7 +340,7 @@ function locale($string) { $locale_t = unserialize($cache->data); } - if (array_key_exists($string, $locale_t)) { + if (is_array($locale_t) && array_key_exists($string, $locale_t)) { $string = $locale_t[$string]; } else { |