Fix reported "Undefined index: environment"

Reported on error reporting server

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-07-19 18:53:39 +02:00
parent 2389c6a07b
commit dce146f596
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -66,7 +66,7 @@ class Template
]);
// It was reported that the config could not be loaded correctly
if (is_array($cfg) && $cfg['environment'] === 'development') {
if (is_array($cfg) && ($cfg['environment'] ?? '') === 'development') {
$twig->enableDebug();
$twig->addExtension(new DebugExtension());
}