You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mb_encoding_aliases(): Argument #1 ($encoding) must be of type string, null given #552
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 ?? '').
Hi @mawiswiss, thanks for the report. This was already fixed in 4.4.18: getValidEncoding now tolerates a null encoding. Please upgrade to the latest release (v4.6.0) and feel free to reopen if it still happens.
Activity
oscarotero commentedon Dec 12, 2024
Good catch. thank you
NathanBaulch commentedon Jun 18, 2026
A related PHP7 issue was also fixed by adding
Document.getValidEncodingin #559.Are there any plans to cut a new release? cc @uzulla
oscarotero commentedon Jun 19, 2026
4.4.18 released
Vitorinox commentedon Oct 31, 2026
Hi @mawiswiss, thanks for the report. This was already fixed in 4.4.18:
getValidEncodingnow tolerates a null encoding. Please upgrade to the latest release (v4.6.0) and feel free to reopen if it still happens.