Skip to content

Commit 93576a8

Browse files
committed
minor symfony#53190 [Process] Suppress warnings from is_executable (bytestream)
This PR was merged into the 6.4 branch. Discussion ---------- [Process] Suppress warnings from `is_executable` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | symfony#52953 | License | MIT The code was recently changed in symfony/process@1f07ae6 Every other `is_executable()` call suppresses warnings. I believe it should here too. Otherwise it outputs: ``` is_executable(): open_basedir restriction in effect. File(/usr/bin/tar) is not within the allowed path(s): (/Users/bytestream) ``` Commits ------- f72945f Suppress warnings from is_executable
2 parents 1934b2e + f72945f commit 93576a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Process/ExecutableFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function find(string $name, string $default = null, array $extraDirs = []
7373
}
7474

7575
$command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v';
76-
if (\function_exists('exec') && ($executablePath = strtok(@exec($command.' '.escapeshellarg($name)), \PHP_EOL)) && is_executable($executablePath)) {
76+
if (\function_exists('exec') && ($executablePath = strtok(@exec($command.' '.escapeshellarg($name)), \PHP_EOL)) && @is_executable($executablePath)) {
7777
return $executablePath;
7878
}
7979

0 commit comments

Comments
 (0)