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
|
@ -48,7 +48,7 @@ class IssnValidator extends ConstraintValidator
|
|||
|
||||
// 1234-567X
|
||||
// ^
|
||||
if (isset($canonical{4}) && '-' === $canonical{4}) {
|
||||
if (isset($canonical[4]) && '-' === $canonical[4]) {
|
||||
// remove hyphen
|
||||
$canonical = substr($canonical, 0, 4).substr($canonical, 5);
|
||||
} elseif ($constraint->requireHyphen) {
|
||||
|
@ -121,7 +121,7 @@ class IssnValidator extends ConstraintValidator
|
|||
|
||||
// 1234567X
|
||||
// ^ digit, x or X
|
||||
if (!ctype_digit($canonical{7}) && 'x' !== $canonical{7} && 'X' !== $canonical{7}) {
|
||||
if (!ctype_digit($canonical[7]) && 'x' !== $canonical[7] && 'X' !== $canonical[7]) {
|
||||
if ($this->context instanceof ExecutionContextInterface) {
|
||||
$this->context->buildViolation($constraint->message)
|
||||
->setParameter('{{ value }}', $this->formatValue($value))
|
||||
|
@ -139,7 +139,7 @@ class IssnValidator extends ConstraintValidator
|
|||
|
||||
// 1234567X
|
||||
// ^ case-sensitive?
|
||||
if ($constraint->caseSensitive && 'x' === $canonical{7}) {
|
||||
if ($constraint->caseSensitive && 'x' === $canonical[7]) {
|
||||
if ($this->context instanceof ExecutionContextInterface) {
|
||||
$this->context->buildViolation($constraint->message)
|
||||
->setParameter('{{ value }}', $this->formatValue($value))
|
||||
|
@ -156,14 +156,14 @@ class IssnValidator extends ConstraintValidator
|
|||
}
|
||||
|
||||
// Calculate a checksum. "X" equals 10.
|
||||
$checkSum = 'X' === $canonical{7}
|
||||
|| 'x' === $canonical{7}
|
||||
$checkSum = 'X' === $canonical[7]
|
||||
|| 'x' === $canonical[7]
|
||||
? 10
|
||||
: $canonical{7};
|
||||
: $canonical[7];
|
||||
|
||||
for ($i = 0; $i < 7; ++$i) {
|
||||
// Multiply the first digit by 8, the second by 7, etc.
|
||||
$checkSum += (8 - $i) * $canonical{$i};
|
||||
$checkSum += (8 - $i) * $canonical[$i];
|
||||
}
|
||||
|
||||
if (0 !== $checkSum % 11) {
|
||||
|
|
Reference in a new issue