[COMPONENTS][Posting] LocaleType::class doesn't have a default attribute, replaced with 'preferred_choices' instead.

This commit is contained in:
Eliseu Amaro 2021-10-29 17:46:25 +01:00
parent 9a23e03330
commit 7fef18e95a
Signed by: eliseuamaro
GPG Key ID: 96DA09D4B97BC2D5

View File

@ -101,7 +101,7 @@ class Posting extends Component
'required' => false,
'invalid_message' => _m('Attachment not valid.'),
]],
['language', LocaleType::class, ['label' => _m('Note language:'), 'multiple' => false, 'default' => $user->getPreferredLanguageChoice()]],
['language', LocaleType::class, ['label' => _m('Note language:'), 'multiple' => false, 'preferred_choices' => Actor::getById($actor_id)->getPreferredLanguageChoice()]],
];
if (\count($available_content_types) > 1) {