Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
remove try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectricMaxxx committed Feb 15, 2015
1 parent 40d3aec commit 87fcbad
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions DependencyInjection/CmfSeoExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,22 +195,19 @@ private function loadAlternateLocaleProvider($config, ContainerBuilder $containe


if ($alternateLocaleProvider) {
try {
$container
->findDefinition('cmf_seo.event_listener.seo_content')
->addMethodCall(
'setAlternateLocaleProvider',
array($container->findDefinition($alternateLocaleProvider))
);
$container
->findDefinition('cmf_seo.sitemap.phpcr_provider')
->addMethodCall(
'setAlternateLocaleProvider',
array($container->findDefinition($alternateLocaleProvider))
);
} catch(\Exception $e) {

}
$alternateLocaleProviderDefinition = $container->findDefinition($alternateLocaleProvider);
$container
->findDefinition('cmf_seo.event_listener.seo_content')
->addMethodCall(
'setAlternateLocaleProvider',
array($alternateLocaleProviderDefinition)
);
$container
->findDefinition('cmf_seo.sitemap.phpcr_provider')
->addMethodCall(
'setAlternateLocaleProvider',
array($alternateLocaleProviderDefinition)
);
}
}

Expand Down

0 comments on commit 87fcbad

Please sign in to comment.