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 d7bc68a

Browse filesBrowse files
bug #21104 [FrameworkBundle] fix IPv6 address handling in server commands (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] fix IPv6 address handling in server commands | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21039 (comment) | License | MIT | Doc PR | This fixes #21039 (comment) as reported by @sstok for the existing commands by backporting @fabpot's patch from #21039. Commits ------- 2bb4713 fix IPv6 address handling in server commands
2 parents 4769ca2 + 2bb4713 commit d7bc68a
Copy full SHA for d7bc68a

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ protected function isOtherServerProcessRunning($address)
5454
return true;
5555
}
5656

57-
list($hostname, $port) = explode(':', $address);
57+
$pos = strrpos($address, ':');
58+
$hostname = substr($address, 0, $pos);
59+
$port = substr($address, $pos + 1);
5860

5961
$fp = @fsockopen($hostname, $port, $errno, $errstr, 5);
6062

0 commit comments

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