Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 7c51cc6

Browse files
authored
add container config service existence check
1 parent a95bc40 commit 7c51cc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/book/v3/cookbook/setting-locale-without-routing-parameter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class SetLocaleMiddlewareFactory
9898
{
9999
public function __invoke(ContainerInterface $container)
100100
{
101-
$config = $container->get('config');
101+
$config = $container->has('config') ? $container->get('config') : [];
102102

103103
return new SetLocaleMiddleware(
104104
$container->get(UrlHelper::class),

0 commit comments

Comments
 (0)