From 8d680449824c09d0963add88dfcfcf459f2e6beb Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sun, 1 Dec 2013 08:59:53 -0500 Subject: [PATCH] Fixes #1373: optimized FileHelper::filterPath --- framework/yii/helpers/BaseFileHelper.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/yii/helpers/BaseFileHelper.php b/framework/yii/helpers/BaseFileHelper.php index 9533b95..325cc8a 100644 --- a/framework/yii/helpers/BaseFileHelper.php +++ b/framework/yii/helpers/BaseFileHelper.php @@ -283,6 +283,11 @@ class BaseFileHelper return $result; } } + + if (empty($options['except']) && empty($options['only'])) { + return true; + } + $path = str_replace('\\', '/', $path); if ($isDir = is_dir($path)) { $path .= '/';