Skip to content

Commit 0c0ab51

Browse files
minor #47474 [HttpFoundation] Use identical comparison for scheme validation (githubfromgui)
This PR was merged into the 6.2 branch. Discussion ---------- [HttpFoundation] Use identical comparison for scheme validation | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT Since the method `getScheme` will always return a `string`, an _identical comparison_ should be used as described by the [Symfony Code Standard Documentation](https://symfony.com/doc/current/contributing/code/standards.html#structure). Commits ------- bf9b5f96dc Use identical comparison for schema validation.
2 parents 79e48cf + 6fe6a1e commit 0c0ab51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ public function getHttpHost(): string
968968
$scheme = $this->getScheme();
969969
$port = $this->getPort();
970970

971-
if (('http' == $scheme && 80 == $port) || ('https' == $scheme && 443 == $port)) {
971+
if (('http' === $scheme && 80 == $port) || ('https' === $scheme && 443 == $port)) {
972972
return $this->getHost();
973973
}
974974

0 commit comments

Comments
 (0)