We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_string
1 parent 4f00c41 commit e3dc482Copy full SHA for e3dc482
Constraints/UrlValidator.php
@@ -80,7 +80,7 @@ public function validate($value, Constraint $constraint)
80
if ($constraint->checkDNS) {
81
$host = parse_url($value, PHP_URL_HOST);
82
83
- if ('' === $host || !checkdnsrr($host, 'ANY')) {
+ if (!is_string($host) || !checkdnsrr($host, 'ANY')) {
84
if ($this->context instanceof ExecutionContextInterface) {
85
$this->context->buildViolation($constraint->dnsMessage)
86
->setParameter('{{ value }}', $this->formatValue($host))
0 commit comments