Skip to content

Commit 56efec6

Browse files
authored
Merge pull request #553 from marcwieland95/fix-mb_encoding_aliases
fix: make sure to pass the correct argument to mb_encoding_aliases()
2 parents a66487b + 1b53985 commit 56efec6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Document.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(Extractor $extractor)
3232
if (!empty($match[1])) {
3333
$encoding = trim($match[1], ',');
3434
try {
35-
$ret = mb_encoding_aliases($encoding);
35+
$ret = mb_encoding_aliases($encoding ?? '');
3636
if ($ret === false) {
3737
$encoding = null;
3838
}
@@ -46,7 +46,7 @@ public function __construct(Extractor $extractor)
4646
$encoding = trim($match[1], ',');
4747
}
4848
try {
49-
$ret = mb_encoding_aliases($encoding);
49+
$ret = mb_encoding_aliases($encoding ?? '');
5050
if ($ret === false) {
5151
$encoding = null;
5252
}

0 commit comments

Comments
 (0)