Commit abe18050 authored by hlarget's avatar hlarget 👹
Browse files

Quick Fix : wrong event call

Merge branch 'release/3.0.3'
parents 3cd6ea3f 0faf0586
......@@ -8,11 +8,13 @@ use Symfony\Component\HttpKernel\Event\RequestEvent;
class LocaleFromBrowserEventSubscriber
{
public function onKernelRequest(RequestEvent $event)
public function onKernelRequest($event)
{
$request = $event->getRequest();
$request->setLocale($request->getPreferredLanguage(["en", "fr"]));
$request->setDefaultLocale($request->getLocale());
if ($event instanceof RequestEvent) {
$request = $event->getRequest();
$request->setLocale($request->getPreferredLanguage(["en", "fr"]));
$request->setDefaultLocale($request->getLocale());
}
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment