mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
fix PHP 8.x Error: array_keys(): Argument #1 ($array) must be of type array, null given
This commit is contained in:
parent
37ff4a00a6
commit
87bf5af8e4
@ -1133,7 +1133,7 @@ class Translation
|
||||
// load all translations from cache at once
|
||||
if ($tree_level) $lang_arr = Cache::getTree(__CLASS__, $tree_level);
|
||||
if ($instance_level) $lang_arr = Cache::getInstance(__CLASS__, $instance_level);
|
||||
$lang_arr = $lang_arr[$app.':en'];
|
||||
$lang_arr = $lang_arr[$app.':en'] ?? [];
|
||||
$ids = array_filter(array_keys($lang_arr), function($haystack) use($translation, $lang_arr) {
|
||||
return stripos($lang_arr[$haystack],$translation) !== false;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user