From 15f0c0b5c3907298ed31422cb411295ec1d5a4f8 Mon Sep 17 00:00:00 2001 From: Emmanuel Prochasson Date: Mon, 18 Mar 2013 15:15:14 +0800 Subject: [PATCH] Fix bug on clearing cache. --- .../elements/plugins/plugin.phpthumbofcachemanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;