Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit03914e9

Browse files
bug#22613 [Process] Fix incorrectly calling PHP process when path contains space (maryo)
This PR was merged into the 3.3-dev branch.Discussion----------[Process] Fix incorrectly calling PHP process when path contains space| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#22556| License | MITI have PHP installed at "D:\Program Files\PHP" which contains a space. `PhpExecutableFinder` found it but then `PhpProcess` splitted the path by space. This PR fixes it. I wanted to write a test but I don't know ho to do it properly since it is dependent on the location where PHP is installed and I can't even mock `PhpExecutableFinder` because it is hardcoded dependency and an implementation detail.Commits-------9c08109 Fix incorrectly calling PHP process on Windows when path contains space
2 parentsfb532bf +9c08109 commit03914e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ class PhpProcess extends Process
3636
publicfunction__construct($script,$cwd =null,array$env =null,$timeout =60,array$options =null)
3737
{
3838
$executableFinder =newPhpExecutableFinder();
39-
if (false ===$php =$executableFinder->find()) {
39+
if (false ===$php =$executableFinder->find(false)) {
4040
$php =null;
4141
}else {
42-
$php =explode('',$php);
42+
$php =array_merge(array($php),$executableFinder->findArguments());
4343
}
4444
if ('phpdbg' ===PHP_SAPI) {
4545
$file =tempnam(sys_get_temp_dir(),'dbg');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp