Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 91b665c

Browse filesBrowse files
apetitpafabpot
apetitpa
authored andcommitted
Switch to is_string native method
1 parent 6071ff6 commit 91b665c
Copy full SHA for 91b665c

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/UrlValidator.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.