Skip to content

Commit

Permalink
Suppress warnings from is_executable
Browse files Browse the repository at this point in the history
  • Loading branch information
bytestream authored Dec 22, 2023
1 parent c3649cf commit c4b1ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ExecutableFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function find(string $name, string $default = null, array $extraDirs = []
}

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

Expand Down

0 comments on commit c4b1ef0

Please sign in to comment.