Skip to content

Commit d6dbdbd

Browse files
authored
Merge pull request #9000 from jdarwood007/fixes8985
[2.1] Ensure languages exist before we try to fix it
2 parents 62e4384 + 3c76c01 commit d6dbdbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3407,7 +3407,7 @@ function getLanguages($use_cache = true)
34073407

34083408
// Avoid confusion when we have more than one English variant installed.
34093409
// Honestly, our default English version should always have been called "English (US)"
3410-
if (substr_count(implode(' ', array_keys($context['languages'])), 'english') > 1 && $context['languages']['english']['name'] === 'English')
3410+
if (!empty($context['languages']) && is_array($context['languages']) && substr_count(implode(' ', array_keys($context['languages'])), 'english') > 1 && $context['languages']['english']['name'] === 'English')
34113411
$context['languages']['english']['name'] = 'English (US)';
34123412

34133413
// Let's cash in on this deal.

0 commit comments

Comments
 (0)