diff --git a/app/database/migrations/2015_03_31_130813_attachment_rename.php b/app/database/migrations/2015_03_31_130813_attachment_rename.php index c097655e62..107ea96dc0 100644 --- a/app/database/migrations/2015_03_31_130813_attachment_rename.php +++ b/app/database/migrations/2015_03_31_130813_attachment_rename.php @@ -31,6 +31,10 @@ public function up() { } private function getDirectores($path) { + //return blank if path does not exist + if (!file_exists($path)) return []; + + //scan through path and return all directories return array_values(array_filter(scandir($path), function ($name) use ($path) { return $name[0] !== '.' && is_dir($path.'/'.$name); }));