🔧
This commit is contained in:
11
vendor/symfony/process/PhpExecutableFinder.php
vendored
11
vendor/symfony/process/PhpExecutableFinder.php
vendored
@@ -32,15 +32,8 @@ class PhpExecutableFinder
|
||||
public function find(bool $includeArgs = true): string|false
|
||||
{
|
||||
if ($php = getenv('PHP_BINARY')) {
|
||||
if (!is_executable($php)) {
|
||||
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v';
|
||||
if (\function_exists('exec') && $php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) {
|
||||
if (!is_executable($php)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
if (!is_executable($php) && !$php = $this->executableFinder->find($php)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (@is_dir($php)) {
|
||||
|
||||
Reference in New Issue
Block a user