if ($i === false) { // $len outside actual string length
return $string;
} else {
- if (abs($len)<strlen($string)) {
+ if (abs($len)<$this->strlen($charset,$string)) { // Has to use ->strlen() - otherwise multibyte strings ending with a multibyte char will return true here (which is not a catastrophe, but...)
if ($len > 0) {
return substr($string,0,$i).$crop;
} else {
}
}
}
-
return $string;
}
*/
function fixed_lgd_cs($string,$chars) {
if (is_object($GLOBALS['LANG'])) {
- return $GLOBALS['LANG']->csConvObj->crop($this->charSet,$string,$chars,'...');
+ return $GLOBALS['LANG']->csConvObj->crop($GLOBALS['LANG']->charSet,$string,$chars,'...');
} else {
return t3lib_div::fixed_lgd($string, $chars);
}