This commit is contained in:
Roman Kelesidis 2025-08-20 16:17:16 +03:00
commit b492b06431
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4
2 changed files with 13 additions and 1 deletions

View file

@ -350,6 +350,18 @@ function array_deep(&$var, $fn, $one_dimensional = false, $array_only = false, $
}
}
function array_deep_merge($base, $overlay)
{
foreach ($overlay as $key => $value) {
if (is_array($value) && isset($base[$key]) && is_array($base[$key])) {
$base[$key] = array_deep_merge($base[$key], $value);
} else {
$base[$key] = $value;
}
}
return $base;
}
/**
* Hide BB_PATH
*

View file

@ -632,7 +632,7 @@ class User
global $lang;
require(LANG_DIR . 'main.php');
setlocale(LC_ALL, $bb_cfg['lang'][$this->data['user_lang']]['locale'] ?? 'en_US.UTF-8');
$lang += $source_lang;
$lang = array_deep_merge($source_lang, $lang);
$theme = setup_style();
$DeltaTime = new DateDelta();