Adds failover for site name var early in index

main
Yasen Pramatarov 2026-03-23 17:22:07 +02:00
parent 2e5ee5632b
commit b388edbb60
1 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,13 @@ $config = ConfigLoader::loadConfig([
'/opt/jilo-web/jilo-web.conf.php',
]);
// Ensure we have value for site name
$siteName = trim((string)($config['site_name'] ?? ''));
if ($siteName === '') {
$siteName = 'Website';
}
$config['site_name'] = $siteName;
// Make config available globally
$GLOBALS['config'] = $config; // FIXME we use old globals and includes before migrating fully to App\App
App::set('config', $config);