#21323t3lib_cs::cropMbstring has problems with negative length
Description
function cropMbstring($charset, $string, $len, $crop = ‘’)
as always, $len can also be negative and is correctly handled.
But the check, weather the string should really be truncated is as followed:
if (intval($len) == 0 || mb_strlen($string) < $len) {
return $string;
}
So, if $len < 0, we never return here, but later prepend “…”.
Solution: check length < abs($len)
One example, where this can be seen is the pagepath on the top right.
(issue imported from #M12297)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.