Skip to content

Commit 12706c4

Browse files
committed
minor symfony#37910 [Filesystem] fix test on PHP 8 (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [Filesystem] fix test on PHP 8 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- c081789 [Filesystem] fix test on PHP 8
2 parents c48b1d3 + c081789 commit 12706c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Filesystem/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)