[FrameworkBundle] fixed init:bundle command

This commit is contained in:
Fabien Potencier 2011-02-08 22:36:36 +01:00
parent 9f52333bf6
commit f35f1e1f3c

View File

@ -71,9 +71,11 @@ EOT
// user specified bundle name?
$bundle = $input->getArgument('bundleName');
if ('' === $bundle) {
if (!$bundle) {
$bundle = strtr($namespace, array('\\' => ''));
} elseif (!preg_match('/Bundle$/', $bundle)) {
}
if (!preg_match('/Bundle$/', $bundle)) {
throw new \InvalidArgumentException('The bundle name must end with Bundle.');
}