Skip to content

Commit 3a470c4

Browse files
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
1 parent 478fbdc commit 3a470c4

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)