Skip to content

Commit 8e6eff5

Browse files
committed
[Filesystem] fix test on PHP 8
1 parent 450ae0a commit 8e6eff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function remove($files)
198198
public function chmod($files, $mode, $umask = 0000, $recursive = false)
199199
{
200200
foreach ($this->toIterable($files) as $file) {
201-
if (true !== @chmod($file, $mode & ~$umask)) {
201+
if ((\PHP_VERSION_ID < 80000 || \is_int($mode)) && true !== @chmod($file, $mode & ~$umask)) {
202202
throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file);
203203
}
204204
if ($recursive && is_dir($file) && !is_link($file)) {

0 commit comments

Comments
 (0)