summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/locale.module2
-rw-r--r--modules/locale/locale.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/locale.module b/modules/locale.module
index ce7ea86d1..9fbb3d38b 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -314,7 +314,7 @@ function locale($string) {
$locale_t = unserialize($cache->data);
}
- if ($locale_t[$string] != "") {
+ if (array_key_exists($string, $locale_t)) {
$string = $locale_t[$string];
}
else {
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index ce7ea86d1..9fbb3d38b 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -314,7 +314,7 @@ function locale($string) {
$locale_t = unserialize($cache->data);
}
- if ($locale_t[$string] != "") {
+ if (array_key_exists($string, $locale_t)) {
$string = $locale_t[$string];
}
else {