Project

General

Profile

Actions

Bug #17301

closed

Wrong cropping of multi-byte $TCA field

Added by John Angel over 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-05-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In function checkValue_input, class.t3lib_tcemain.php:1264

OLD CODE:

// Secures the string-length to be less than max. Will probably make problems with multi-byte strings!
if (intval($tcaFieldConf['max'])>0) {$value = substr($value,0,intval($tcaFieldConf['max']));}

NEW CODE:

if (intval($tcaFieldConf['max'])>0) {
global $LANG;
$value = $LANG->csConvObj->substr($LANG->charSet,$value,0,intval($tcaFieldConf['max']));
}

(issue imported from #M5618)


Files

bug_5618_4.2.5.patch (782 Bytes) bug_5618_4.2.5.patch Administrator Admin, 2009-02-05 14:48
Actions #1

Updated by Michael Miousse almost 16 years ago

I confirm the bug.

ill make a patch for 4.2.5 and submit it to the core

Actions #2

Updated by Ingo Renner over 15 years ago

committed to trunk (4.3)

Actions

Also available in: Atom PDF