8000 Switch to `is_string` native method · symfony/symfony@91b665c · GitHub
[go: up one dir, main page]

Skip to content

Commit 91b665c

Browse files
apetitpafabpot
apetitpa
authored andcommitted
Switch to is_string native method
1 parent 6071ff6 commit 91b665c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Validator/Constraints/UrlValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function validate($value, Constraint $constraint)
8080
if ($constraint->checkDNS) {
8181
$host = parse_url($value, PHP_URL_HOST);
8282

83-
if ('' === $host || !checkdnsrr($host, 'ANY')) {
83+
if (!is_string($host) || !checkdnsrr($host, 'ANY')) {
8484
if ($this->context instanceof ExecutionContextInterface) {
8585
$this->context->buildViolation($constraint->dnsMessage)
8686
->setParameter('{{ value }}', $this->formatValue($host))

0 commit comments

Comments
 (0)
0