Skip to content

Commit

Permalink
Fix encoding issue in localize date smarty plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
iherwig committed Jul 5, 2024
1 parent 9c4f2e5 commit 2f1bb46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wcmf/application/views/plugins/modifier.localize_date.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ function smarty_modifier_localize_date($date, $lang) {
];
foreach ($names as $name) {
$localizeName = $message->getText($name, null, $lang);
$localizeShortName = substr($localizeName, 0, 3);
$date = strtr($date, [$name => $localizeName, substr($name, 0, 3) => $localizeShortName]);
$localizeShortName = mb_substr($localizeName, 0, 3);
$date = strtr($date, [$name => $localizeName, mb_substr($name, 0, 3) => $localizeShortName]);
}
return $date;
}
Expand Down

0 comments on commit 2f1bb46

Please sign in to comment.