From 9bc8c3304bfcd152a1dcd85d0bd5cb93db3f7728 Mon Sep 17 00:00:00 2001 From: resurtm Date: Fri, 27 Jun 2014 21:07:12 +0600 Subject: [PATCH] https://github.com/yiisoft/yii2/pull/4091#discussion_r14296860 --- framework/helpers/BaseFileHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/helpers/BaseFileHelper.php b/framework/helpers/BaseFileHelper.php index fe65f6092a..4ef019c3a4 100644 --- a/framework/helpers/BaseFileHelper.php +++ b/framework/helpers/BaseFileHelper.php @@ -289,10 +289,10 @@ class BaseFileHelper continue; } $path = $dir . DIRECTORY_SEPARATOR . $file; - if (is_file($path)) { - unlink($path); - } else { + if (is_dir($path)) { static::removeDirectory($path, $options); + } else { + unlink($path); } } closedir($handle);