Skip to content

Commit

Permalink
[AdminBundle][MultidomainBundle] Check if container has service befor…
Browse files Browse the repository at this point in the history
…e changing it (#2053)
  • Loading branch information
acrobat authored and sandergo90 committed Jul 20, 2018
1 parent 8b955eb commit 8675764
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public function process(ContainerBuilder $container)
);

// Inject the container back, to keep BC, if the user override the domain configuration with the "kunstmaan_admin.domain_configuration.class" parameter.
$container->getDefinition('kunstmaan_admin.domain_configuration')->setArguments([new Reference('service_container')]);
if ($container->hasDefinition('kunstmaan_admin.domain_configuration')) {
$container->getDefinition('kunstmaan_admin.domain_configuration')->setArguments([new Reference('service_container')]);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public function process(ContainerBuilder $container)
);

// Inject the container back, to keep BC, if the user override the domain configuration with the "kunstmaan_multi_domain.domain_configuration.class" parameter.
$container->getDefinition('kunstmaan_multi_domain.domain_configuration')->setArguments([new Reference('service_container')]);
if ($container->hasDefinition('kunstmaan_multi_domain.domain_configuration')) {
$container->getDefinition('kunstmaan_multi_domain.domain_configuration')->setArguments([new Reference('service_container')]);
}
}
}
}

0 comments on commit 8675764

Please sign in to comment.