Skip to content

Commit c266d6c

Browse files
authored
Update Request.php
1 parent 23db9be commit c266d6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpFoundation/Request.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,8 @@ public function getPort()
10371037
$pos = strrpos($host, ':');
10381038
}
10391039

1040-
if (false !== $pos && !empty(substr($host, $pos + 1))) {
1041-
return (int) substr($host, $pos + 1);
1040+
if (false !== $pos && '' !== $port = substr($host, $pos + 1)) {
1041+
return (int) $port;
10421042
}
10431043

10441044
return 'https' === $this->getScheme() ? 443 : 80;

0 commit comments

Comments
 (0)