diff --git a/DependencyInjection/NelmioCorsExtension.php b/DependencyInjection/NelmioCorsExtension.php index af17545..c6cc13c 100644 --- a/DependencyInjection/NelmioCorsExtension.php +++ b/DependencyInjection/NelmioCorsExtension.php @@ -65,7 +65,9 @@ public function load(array $configs, ContainerBuilder $container) } elseif (isset($opts['allow_headers'])) { $opts['allow_headers'] = array_map('strtolower', $opts['allow_headers']); } - $opts['allow_methods'] = array_map('strtoupper', $opts['allow_methods']); + if (isset($opts['allow_methods'])) { + $opts['allow_methods'] = array_map('strtoupper', $opts['allow_methods']); + } $config['paths'][$path] = $opts; }