This commit is contained in:
Fabien Potencier 2011-04-19 14:15:50 +02:00
parent 7b87a6143a
commit dd7b4a13b6
2 changed files with 6 additions and 6 deletions

View File

@ -165,11 +165,11 @@ abstract class DoctrineCommand extends Command
protected function findBasePathForBundle($bundle)
{
$path = str_replace('\\', '/', $bundle->getNamespace());
$search = str_replace('\\','/',$bundle->getPath());
$destination = str_replace('/'.$path, "", $search, $c);
$search = str_replace('\\', '/', $bundle->getPath());
$destination = str_replace('/'.$path, '', $search, $c);
if ($c != 1) {
throw new \RuntimeException("Can't find base path for bundle. Path: $path , Destination: $destination");
throw new \RuntimeException('Can\'t find base path for bundle (path: "$path", destination: "$destination").');
}
return $destination;

View File

@ -109,11 +109,11 @@ abstract class DoctrineODMCommand extends Command
protected function findBasePathForBundle($bundle)
{
$path = str_replace('\\', '/', $bundle->getNamespace());
$search = str_replace('\\','/',$bundle->getPath());
$destination = str_replace('/'.$path, "", $search, $c);
$search = str_replace('\\', '/', $bundle->getPath());
$destination = str_replace('/'.$path, '', $search, $c);
if ($c != 1) {
throw new \RuntimeException("Can't find base path for bundle. Path: $path , Destination: $destination");
throw new \RuntimeException('Can\'t find base path for bundle (path: "$path", destination: "$destination").');
}
return $destination;