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 1728dcc

Browse filesBrowse files
minor #16599 [Process] Fix trailing space in PHP binary finder (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [Process] Fix trailing space in PHP binary finder | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16598 | License | MIT | Doc PR | - Commits ------- f15e6e0 [Process] Fix trailing space in PHP binary finder
2 parents 49aa6d4 + f15e6e0 commit 1728dcc
Copy full SHA for 1728dcc

File tree

1 file changed

+5
-2
lines changed
Filter options

1 file changed

+5
-2
lines changed

‎src/Symfony/Component/Process/PhpExecutableFinder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/PhpExecutableFinder.php
+5-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.