Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6
This commit is contained in:
parent
db56c09587
commit
f1e72395cb
588 changed files with 26857 additions and 2777 deletions
|
@ -40,13 +40,10 @@ class LengthValidator extends ConstraintValidator
|
|||
|
||||
$stringValue = (string) $value;
|
||||
|
||||
if ('UTF8' === $charset = strtoupper($constraint->charset)) {
|
||||
$charset = 'UTF-8'; // iconv on Windows requires "UTF-8" instead of "UTF8"
|
||||
if (!$invalidCharset = !@mb_check_encoding($stringValue, $constraint->charset)) {
|
||||
$length = mb_strlen($stringValue, $constraint->charset);
|
||||
}
|
||||
|
||||
$length = @iconv_strlen($stringValue, $charset);
|
||||
$invalidCharset = false === $length;
|
||||
|
||||
if ($invalidCharset) {
|
||||
if ($this->context instanceof ExecutionContextInterface) {
|
||||
$this->context->buildViolation($constraint->charsetMessage)
|
||||
|
|
Reference in a new issue