From 8fa22178dfc368911dbd513b431cd9b06f9afe7a Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 2 Dec 2023 09:38:30 +0100 Subject: [PATCH 1/2] always pass microseconds to usleep as integers --- Pipes/WindowsPipes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipes/WindowsPipes.php b/Pipes/WindowsPipes.php index bca84f57..968dd026 100644 --- a/Pipes/WindowsPipes.php +++ b/Pipes/WindowsPipes.php @@ -149,7 +149,7 @@ public function readAndWrite(bool $blocking, bool $close = false): array if ($w) { @stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1E6); } elseif ($this->fileHandles) { - usleep(Process::TIMEOUT_PRECISION * 1E6); + usleep((int) (Process::TIMEOUT_PRECISION * 1E6)); } } foreach ($this->fileHandles as $type => $fileHandle) { From c4b1ef0bc80533d87a2e969806172f1c2a980241 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 22 Dec 2023 16:42:54 +0000 Subject: [PATCH 2/2] Suppress warnings from is_executable --- ExecutableFinder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExecutableFinder.php b/ExecutableFinder.php index 3681e356..412723a9 100644 --- a/ExecutableFinder.php +++ b/ExecutableFinder.php @@ -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; }