Commit 6744228e by Carsten Brandt

use mb_string to work with non latin characters

parent 32c12217
...@@ -268,9 +268,9 @@ class AssetManager extends Component ...@@ -268,9 +268,9 @@ class AssetManager extends Component
$asset = $bundle->sourcePath . '/' . $asset; $asset = $bundle->sourcePath . '/' . $asset;
} }
$n = strlen($asset); $n = mb_strlen($asset);
foreach ($this->assetMap as $from => $to) { foreach ($this->assetMap as $from => $to) {
$n2 = strlen($from); $n2 = mb_strlen($from);
if ($n2 <= $n && substr_compare($asset, $from, $n - $n2, $n2) === 0) { if ($n2 <= $n && substr_compare($asset, $from, $n - $n2, $n2) === 0) {
return $to; return $to;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment