Actions
Bug #21323
closedt3lib_cs::cropMbstring has problems with negative length
Start date:
2009-10-21
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:
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)
Files
Actions