Skip to content

Commit

Permalink
Fix invalid call when allow_methods is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Oct 21, 2013
1 parent b0cfd05 commit b9b85b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DependencyInjection/NelmioCorsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b9b85b1

Please sign in to comment.