mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-23 02:35:23 +00:00
apply null coalescing operator
Co-authored-by: Mikhail Romanov <42250412+Ribas160@users.noreply.github.com>
This commit is contained in:
parent
0e2055d54a
commit
c8643f187e
1 changed files with 1 additions and 2 deletions
|
|
@ -149,8 +149,7 @@ class Configuration
|
|||
$config = parse_ini_file($configFile, true);
|
||||
foreach (array('main', 'model', 'model_options') as $section) {
|
||||
if (!array_key_exists($section, $config)) {
|
||||
$name = array_key_exists('main', $config) && array_key_exists('name', $config['main']) ?
|
||||
$config['main']['name'] : self::getDefaults()['main']['name'];
|
||||
$name = $config['main']['name'] ?? self::getDefaults()['main']['name'];
|
||||
throw new TranslatedException(array('%s requires configuration section [%s] to be present in configuration file.', I18n::_($name), $section), 2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue