diff --git a/core/components/phpthumbof/elements/plugins/plugin.phpthumbofcachemanager.php b/core/components/phpthumbof/elements/plugins/plugin.phpthumbofcachemanager.php index 644736d..7064735 100644 --- a/core/components/phpthumbof/elements/plugins/plugin.phpthumbofcachemanager.php +++ b/core/components/phpthumbof/elements/plugins/plugin.phpthumbofcachemanager.php @@ -40,7 +40,7 @@ $cacheDir = $assetsPath.'cache/'; /* clear local cache */ - if (!empty($cacheDir)) { + if (is_dir($cacheDir) && !empty($cacheDir)) { /** @var DirectoryIterator $file */ foreach (new DirectoryIterator($cacheDir) as $file) { if (!$file->isFile()) continue;