diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 8f1d8e353..bbcdcdb4b 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -11,6 +11,7 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE + [#2081](https://github.com/luyadev/luya/pull/2081) Removed deprecated methods and/or added a deprecation error trigger. + [#2077](https://github.com/luyadev/luya/pull/2077) Fix issue with caching when using SVG widget and symbol names. + [#2085](https://github.com/luyadev/luya/pull/2085) Option to disable language override by resolved composition content in UrlManager. ++ [#2089](https://github.com/luyadev/luya/pull/2089) Ensure that `scanDirectoryFiles()` returns only files and not folders. ## 1.9.0 (11. February 2021) diff --git a/core/console/commands/ImportController.php b/core/console/commands/ImportController.php index 06ff385e1..f62ca0fc4 100644 --- a/core/console/commands/ImportController.php +++ b/core/console/commands/ImportController.php @@ -96,6 +96,7 @@ protected function scanDirectoryFiles($path, $ns, $module) foreach (scandir($path) as $file) { if (substr($file, 0, 1) !== '.') { $files[] = [ + 'isFile' => is_file($path.DIRECTORY_SEPARATOR.$file), 'file' => $file, 'filePath' => $path.DIRECTORY_SEPARATOR.$file, 'module' => $module, @@ -116,7 +117,9 @@ public function getDirectoryFiles($folderName) if (array_key_exists($folderName, $this->_dirs)) { foreach ($this->_dirs[$folderName] as $folder) { foreach ($folder['files'] as $file) { - $files[] = $file; + if ($file['isFile']) { + $files[] = $file; + } } } }