diff --git a/utils/FileSizeHelper.php b/utils/FileSizeHelper.php index 7f8c722..355a999 100644 --- a/utils/FileSizeHelper.php +++ b/utils/FileSizeHelper.php @@ -17,6 +17,9 @@ class FileSizeHelper */ public static function getDirectorySize(string $directory): int { + if (!is_dir($directory)) { + return 0; + } $size = 0; $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)); foreach ($files as $file) {