1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
Daniel Neto 2023-03-29 13:45:43 -03:00
parent da58cebc83
commit 084d70a96d

View file

@ -138,6 +138,7 @@ function setSiteLang()
} else if ($userLocation) { } else if ($userLocation) {
User_Location::changeLang(); User_Location::changeLang();
} }
try {
if (empty($config) || !is_object($config)) { if (empty($config) || !is_object($config)) {
require_once $global['systemRootPath'] . 'objects/configuration.php'; require_once $global['systemRootPath'] . 'objects/configuration.php';
if (!class_exists('Configuration')) { if (!class_exists('Configuration')) {
@ -145,7 +146,11 @@ function setSiteLang()
} }
$config = new Configuration(); $config = new Configuration();
} }
if (empty($_SESSION['language']) && !empty($config)) { } catch (Exception $exc) {
_error_log('setSiteLang '.$exc->getMessage());
}
if (empty($_SESSION['language']) && is_object($config)) {
setLanguage($config->getLanguage()); setLanguage($config->getLanguage());
} }
if (empty($_SESSION['language'])) { if (empty($_SESSION['language'])) {