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 81cef4b

Browse filesBrowse files
committed
bug #27264 [Validator] Use strict type in URL validator (mimol91)
This PR was merged into the 3.4 branch. Discussion ---------- [Validator] Use strict type in URL validator | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes Fixed tickets | - | License | MIT | Doc PR | - Using `checkDNS` option with value `true` generate error `Warning: checkdnsrr(): Type '1' not supported`. In SF 3.4 it was mark as depreciation and silently converted to `ANY` https://github.com/symfony/symfony/blob/v3.4.9/src/Symfony/Component/Validator/Constraints/UrlValidator.php#L79 ~~Test are failing on `Symfony\Component\HttpKernel\Tests\ControllerMetadata\ArgumentMetadataFactoryTest::testSignature1` - I think its not related~~ Commits ------- 2400e71 use strict compare in url validator
2 parents 4f9d907 + 2400e71 commit 81cef4b
Copy full SHA for 81cef4b

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
@@ -92,7 +92,7 @@ public function validate($value, Constraint $constraint)
9292
Url::CHECK_DNS_TYPE_SOA,
9393
Url::CHECK_DNS_TYPE_SRV,
9494
Url::CHECK_DNS_TYPE_TXT,
95-
))) {
95+
), true)) {
9696
throw new InvalidOptionsException(sprintf('Invalid value for option "checkDNS" in constraint %s', get_class($constraint)), array('checkDNS'));
9797
}
9898

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.