-
Notifications
You must be signed in to change notification settings - Fork 263
Open
Description
Basic Information
The language of my forum is slovenian and I get this warning thw whole time in the error_log
[16-Oct-2025 10:26:25 Europe/Berlin] PHP Warning: array_keys() expects parameter 1 to be array, null given in /public_html/gobe/forum/Sources/Load.php on line 3401
[16-Oct-2025 10:26:25 Europe/Berlin] PHP Warning: implode(): Invalid arguments passed in /public_html/gobe/forum/Sources/Load.php on line 3401
This is the code:
if (substr_count(implode(' ', array_keys($context['languages'])), 'english') > 1 && $context['languages']['english']['name'] === 'English')
$context['languages']['english']['name'] = 'English (US)';
I got rid of the warning by it by enclosing it into this:
if (!empty($context['languages']) && is_array($context['languages'])) {
}
Steps to reproduce
Expected result
No response
Actual result
No response
Version/Git revision
2.1.6
Database Engine
All
Database Version
No response
PHP Version
7.4
Logs
Additional Information
No response