Skip to content

Commit

Permalink
Change deprecated utf8_encode to mb_convert_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
iRaziul authored Aug 21, 2024
1 parent 24378a6 commit b4acbdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Observers/MediaObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function creating(Media $media): void
// Fix malformed utf-8 characters
array_walk_recursive($v, function (&$entry) {
if (! mb_detect_encoding($entry, 'utf-8', true)) {
$entry = utf8_encode($entry);
$entry = mb_convert_encoding($entry, 'utf-8');
}
});

Expand Down

0 comments on commit b4acbdd

Please sign in to comment.