Skip to content

Commit c4e87df

Browse files
committed
Merge pull request #589 from LearningLocker/issue/attachment-migration
Fix for missing dir path on attachment migration
2 parents 5835af7 + c491174 commit c4e87df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/database/migrations/2015_03_31_130813_attachment_rename.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ public function up() {
3131
}
3232

3333
private function getDirectores($path) {
34+
//return blank if path does not exist
35+
if (!file_exists($path)) return [];
36+
37+
//scan through path and return all directories
3438
return array_values(array_filter(scandir($path), function ($name) use ($path) {
3539
return $name[0] !== '.' && is_dir($path.'/'.$name);
3640
}));

0 commit comments

Comments
 (0)