From c08178978a52b396314a232090e9e1aab3710658 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 21 Aug 2020 14:41:08 +0200 Subject: [PATCH] [Filesystem] fix test on PHP 8 --- src/Symfony/Component/Filesystem/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 0b5297ecf0..a78d81d723 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -198,7 +198,7 @@ class Filesystem public function chmod($files, $mode, $umask = 0000, $recursive = false) { foreach ($this->toIterable($files) as $file) { - if (true !== @chmod($file, $mode & ~$umask)) { + if ((\PHP_VERSION_ID < 80000 || \is_int($mode)) && true !== @chmod($file, $mode & ~$umask)) { throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file); } if ($recursive && is_dir($file) && !is_link($file)) {