Make existing configs backwards compatible with the trusted_proxies option

This commit is contained in:
Fedor A. Fetisov 2017-03-09 23:58:13 +03:00
parent 8b1e218862
commit e2099735e1

View File

@ -59,6 +59,12 @@ function load_system_configs()
$configs['plugins'] = array(); $configs['plugins'] = array();
} }
// Trusted proxies section should exists too. The logic behind "empty" statement is
// the same as above.
if (empty($configs['trusted_proxies'])) {
$configs['trusted_proxies'] = array();
}
// Database section should exists too. Also it should have an appropriate structure. // Database section should exists too. Also it should have an appropriate structure.
if (empty($configs['database'])) { if (empty($configs['database'])) {
$configs['database'] = array(); $configs['database'] = array();