Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -34,7 +34,7 @@ class UrlValidator extends ConstraintValidator
|
|||
\] # a IPv6 address
|
||||
)
|
||||
(:[0-9]+)? # a port (optional)
|
||||
(/?|/\S+|\?|\#) # a /, nothing, a / with something, a query or a fragment
|
||||
(/?|/\S+|\?\S*|\#\S*) # a /, nothing, a / with something, a query or a fragment
|
||||
$~ixu';
|
||||
|
||||
/**
|
||||
|
@ -65,10 +65,12 @@ class UrlValidator extends ConstraintValidator
|
|||
if ($this->context instanceof ExecutionContextInterface) {
|
||||
$this->context->buildViolation($constraint->message)
|
||||
->setParameter('{{ value }}', $this->formatValue($value))
|
||||
->setCode(Url::INVALID_URL_ERROR)
|
||||
->addViolation();
|
||||
} else {
|
||||
$this->buildViolation($constraint->message)
|
||||
->setParameter('{{ value }}', $this->formatValue($value))
|
||||
->setCode(Url::INVALID_URL_ERROR)
|
||||
->addViolation();
|
||||
}
|
||||
|
||||
|
@ -81,12 +83,14 @@ class UrlValidator extends ConstraintValidator
|
|||
if (!checkdnsrr($host, 'ANY')) {
|
||||
if ($this->context instanceof ExecutionContextInterface) {
|
||||
$this->context->buildViolation($constraint->dnsMessage)
|
||||
->setParameter('{{ value }}', $this->formatValue($host))
|
||||
->addViolation();
|
||||
->setParameter('{{ value }}', $this->formatValue($host))
|
||||
->setCode(Url::INVALID_URL_ERROR)
|
||||
->addViolation();
|
||||
} else {
|
||||
$this->buildViolation($constraint->dnsMessage)
|
||||
->setParameter('{{ value }}', $this->formatValue($host))
|
||||
->addViolation();
|
||||
->setParameter('{{ value }}', $this->formatValue($host))
|
||||
->setCode(Url::INVALID_URL_ERROR)
|
||||
->addViolation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue