Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Validator] CharsetValidator throws TypeError when the value has an invalid charset #56805

Copy link
Copy link
Closed
@ludekbenedik

Description

@ludekbenedik
Issue body actions

Symfony version(s) affected

7.1.0-RC1

Description

In CharsetValidator.php line 41:

[TypeError]
implode(): Argument 2 ($array) must be of type ?array, string given

How to reproduce

$this->validator->validate(substr('á', 0, 1), new Assert\Charset('UTF-8'));

Possible Solution

CharsetValidator.php line 41: ->setParameter('{{ encodings }}', implode(', ', (array) $constraint->encodings))

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.