Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #13527 [Validator] drop grapheme_strlen in LengthValidator (nicol…
…as-grekas) This PR was merged into the 2.3 branch. Discussion ---------- [Validator] drop grapheme_strlen in LengthValidator | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13491 | License | MIT | Doc PR | - As stated in #13491, validating the length of a string with grapheme_strlen is not suited to validating input because a very long string can in fact have a length of 1 when counted with grapheme_strlen. Counting UTF-8 characters (not clusters) is not subject to this problem. The attached patch removes using grapheme_strlen but also adds more fallback when couting the length of strings, using iconv (which is more broadly avail. than mbstring) or PCRE for UTF-8 strings. Commits ------- 915fcd8 [Validator] drop grapheme_strlen in LengthValidator
- Loading branch information