forked from wallabag/wallabag
Fix canonicalize depreciation
This commit is contained in:
@ -668,7 +668,7 @@ class ConfigController extends AbstractController
|
|||||||
*/
|
*/
|
||||||
public function setLocaleAction(Request $request, ValidatorInterface $validator, $language = null)
|
public function setLocaleAction(Request $request, ValidatorInterface $validator, $language = null)
|
||||||
{
|
{
|
||||||
$errors = $validator->validate($language, (new LocaleConstraint()));
|
$errors = $validator->validate($language, (new LocaleConstraint(['canonicalize' => true])));
|
||||||
|
|
||||||
if (0 === \count($errors)) {
|
if (0 === \count($errors)) {
|
||||||
$request->getSession()->set('_locale', $language);
|
$request->getSession()->set('_locale', $language);
|
||||||
|
|||||||
@ -98,7 +98,7 @@ class ContentProxy
|
|||||||
|
|
||||||
$errors = $this->validator->validate(
|
$errors = $this->validator->validate(
|
||||||
$value,
|
$value,
|
||||||
(new LocaleConstraint())
|
(new LocaleConstraint(['canonicalize' => true]))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (0 === \count($errors)) {
|
if (0 === \count($errors)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user