Skip to content

Commit 0e3a5e4

Browse files
committed
minor #44825 [Filesystem] Renamed reused variable $files in Filesystem::doRemove() (fwolfsjaeger)
This PR was merged into the 6.1 branch. Discussion ---------- [Filesystem] Renamed reused variable `$files` in `Filesystem::doRemove()` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a It's not really a bug, but the variable name $files is already used for the foreach loop. Commits ------- 6d3f3d74ef [Filesystem] Renamed reused variable `$files` in `Filesystem::doRemove()`
2 parents 52b3c9c + 8424e3c commit 0e3a5e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Filesystem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ private static function doRemove(array $files, bool $isRecursive): void
178178
}
179179
}
180180

181-
$files = new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS);
182-
self::doRemove(iterator_to_array($files, true), true);
181+
$filesystemIterator = new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS);
182+
self::doRemove(iterator_to_array($filesystemIterator, true), true);
183183

184184
if (!self::box('rmdir', $file) && file_exists($file) && !$isRecursive) {
185185
$lastError = self::$lastError;

0 commit comments

Comments
 (0)