Skip to content

Commit da2b05e

Browse files
committed
Fix ports including linebreaks
1 parent e50d2c3 commit da2b05e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Commands/Services/StatusCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\Console\Input\InputOption;
2020
use Symfony\Component\Console\Output\OutputInterface;
2121
use function array_key_exists;
22+
use function array_map;
2223
use function explode;
2324
use function implode;
2425
use function parse_url;
@@ -181,7 +182,7 @@ private function getPortsFromString(string $string): string
181182
}
182183
}
183184

184-
$ports = implode("\n", $tmp);
185+
$ports = implode("\n", array_filter(array_map('trim', $tmp)));
185186
}
186187

187188
return $ports;

0 commit comments

Comments
 (0)