check if is file

This commit is contained in:
Dennis Eichhorn 2024-03-16 21:34:53 +00:00
parent 42724218df
commit d24bcd69e9

View File

@ -91,7 +91,7 @@ class Cache
/** @var \DirectoryIterator $item */ /** @var \DirectoryIterator $item */
foreach ($iterator as $item) { foreach ($iterator as $item) {
if (!$item->isDot() if (!$item->isDot()
&& $item->isFile() && \is_file($item->getPathname())
&& !$this->isDotFile($item) && !$this->isDotFile($item)
&& $this->isOld($item)) { && $this->isOld($item)) {
unlink($item->getPathname()); unlink($item->getPathname());