Skip to content
Snippets Groups Projects
Commit b11d99fe authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Fixed bug #3564: missing check in locale module.
parent 1a5fcacd
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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 {
......
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment