10000 [Process] Fix trailing space in PHP binary finder · symfony/symfony@f15e6e0 · GitHub
[go: up one dir, main page]

Skip to content

Commit f15e6e0

Browse files
[Process] Fix trailing space in PHP binary finder
1 parent a05e73f commit f15e6e0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Symfony/Component/Process/PhpExecutableFinder.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ public function __construct()
3535
*/
3636
public function find($includeArgs = true)
3737
{
38+
$args = $this->findArguments();
39+
$args = $includeArgs && $args ? ' '.implode(' ', $args) : '';
40+
3841
// HHVM support
3942
if (defined('HHVM_VERSION')) {
40-
return (getenv('PHP_BINARY') ?: PHP_BINARY).($includeArgs ? ' '.implode(' ', $this->findArguments()) : '');
43+
return (getenv('PHP_BINARY') ?: PHP_BINARY).$args;
4144
}
4245

4346
// PHP_BINARY return the current sapi executable
4447
if (defined('PHP_BINARY') && PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg')) && is_file(PHP_BINARY)) {
45-
return PHP_BINARY.($includeArgs ? ' '.implode(' ', $this->findArguments()) : '');
48+
return PHP_BINARY.$args;
4649
}
4750

4851
if ($php = getenv('PHP_PATH')) {

0 commit comments

Comments
 (0)
0