Project

General

Profile

Actions

Bug #79684

closed

Extbase validator StringLength fails on counting the length of text with umlauts

Added by Karsten Nowak (undkonsorten) about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Extbase
Target version:
-
Start date:
2017-02-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In extbase StringLength validator on line 59 $stringLength = strlen($value); the length is wrong if umlaute (ä,ö,ü) in text. Probably also with other multibyte characters in text.

We fixed this quickly by using mb_strlen instead of strlen in our own extension and overwrite the StringLengthValidator class.

Is mb_strlen the solution for this problem? Is it planned to fix this problem in the validator soon?

Actions #1

Updated by Georg Ringer about 7 years ago

  • Status changed from New to Accepted
  • Assignee set to Georg Ringer
Actions #2

Updated by Gerrit Code Review about 7 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51593

Actions #3

Updated by Georg Ringer about 7 years ago

hopefully soon enough! ;)

Actions #4

Updated by Karsten Nowak (undkonsorten) about 7 years ago

Yes, I think it's soon enough. Thx.
I'm wondering that nobody else had this problem before. Maybe nobody checked lengths of strings so close to the limit. We found this bug because on our validation were two characters be left to the limit and 6 umlauts in text ;-).

Actions #5

Updated by Gerrit Code Review about 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51593

Actions #6

Updated by Georg Ringer about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF