Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marcwieland95 opened this issue Dec 12, 2024 · 1 comment

Comments

@marcwieland95
Copy link
Contributor

marcwieland95 commented Dec 12, 2024

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

@oscarotero
Copy link
Owner

Good catch. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants