mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
Verify existence of configuration before use
This commit is contained in:
@@ -337,10 +337,10 @@ class Application extends SilexApplication
|
||||
$this['phraseanet.api_cors.options_provider'] = function (Application $app) {
|
||||
$paths = [];
|
||||
|
||||
if (isset($app['phraseanet.configuration']['api_cors']['enabled'])) {
|
||||
if (isset($app['phraseanet.configuration']['api_cors'])) {
|
||||
$config = $app['phraseanet.configuration']['api_cors'];
|
||||
|
||||
if ($config['enabled']) {
|
||||
if (isset($config['enabled']) && $config['enabled']) {
|
||||
unset($config['enabled']);
|
||||
|
||||
$paths['/api/v\d+/'] = $config;
|
||||
|
||||
Reference in New Issue
Block a user