Skip to content

Commit

Permalink
fix clearing profiles
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Jul 14, 2023
1 parent bfa4139 commit a3cba10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/private/Profiler/FileProfilerStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ public function purge(): void {
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST);

foreach ($iterator as $file) {
$file = (string)$file->getPathInfo();
if (is_file($file)) {
unlink($file);
/** @var \SplFileInfo $file */
if ($file->isFile()) {
unlink($file->getPathname());
} else {
rmdir($file);
rmdir($file->getPathname());
}
}
}
Expand Down

0 comments on commit a3cba10

Please sign in to comment.