Skip to content

Commit 346d2f9

Browse files
committed
use the explicit method to get locale
1 parent f831d4c commit 346d2f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Admin/Extension/TranslatableExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function alterNewInstance(AdminInterface $admin, $object)
6666
}
6767

6868
if ($admin->hasRequest()) {
69-
$currentLocale = $admin->getRequest()->attributes->get('_locale');
69+
$currentLocale = $admin->getRequest()->getLocale();
7070

7171
if (in_array($currentLocale, $this->locales)) {
7272
$object->setLocale($currentLocale);

0 commit comments

Comments
 (0)