8000 bug #26040 [Process] Check PHP_BINDIR before $PATH in PhpExecutableFi… · symfony/symfony@0b08f37 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b08f37

Browse files
committed
bug #26040 [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25187 | License | MIT | Doc PR | - Commits ------- 3a470c4 [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2 parents ec9a109 + 3a470c4 commit 0b08f37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Process/PhpExecutableFinder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public function find($includeArgs = true)
6262
}
6363
}
6464

65+
if (is_executable($php = PHP_BINDIR.'/php'.('\\' === DIRECTORY_SEPARATOR ? '.exe' : ''))) {
66+
return $php;
67+
}
68+
6569
$dirs = array(PHP_BINDIR);
6670
if ('\\' === DIRECTORY_SEPARATOR) {
6771
$dirs[] = 'C:\xampp\php\\';

0 commit comments

Comments
 (0)
0