Skip to content

Commit 81cef4b

Browse 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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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)