Skip to content

mb_encoding_aliases(): Argument #1 ($encoding) must be of type string, null given #552

Description

@mawiswiss

Hey there,
I'm enforcing types in my project and got a new error lately concerning this package.

Uncaught TypeError: mb_encoding_aliases(): Argument #1 ($encoding) must be of type string, null given in /var/www/vendor/embed/embed/src/Document.php:49 Stack trace: #0 /var/www/vendor/embed/embed/src/Document.php(49): mb_encoding_aliases(NULL).

Our initial value should be an empty string instead of null $encoding = ''; or the function called more securely with a fallback value mb_encoding_aliases($encoding ?? '').

Pull request which fixes the issue:
#553

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions