Skip to content

Commit c9d65bd

Browse files
authored
[FrameworkBundle] Ignore missing directories in about command
1 parent 8e88b51 commit c9d65bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Command/AboutCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ private static function formatFileSize(string $path): string
109109
if (is_file($path)) {
110110
$size = filesize($path) ?: 0;
111111
} else {
112+
if (!is_dir($path)) {
113+
return 'n/a';
114+
}
115+
112116
$size = 0;
113117
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS | \RecursiveDirectoryIterator::FOLLOW_SYMLINKS)) as $file) {
114118
if ($file->isReadable()) {

0 commit comments

Comments
 (0)