From 589f55d8954cc90ed1a92203ac24d5eb8b0887c6 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 10 Feb 2022 17:13:07 +0100 Subject: [PATCH] [9.x] Fix FTP root config (#40939) * Fix FTP root config * Update src/Illuminate/Filesystem/FilesystemManager.php Co-authored-by: Frank de Jonge Co-authored-by: Frank de Jonge --- src/Illuminate/Filesystem/FilesystemManager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Illuminate/Filesystem/FilesystemManager.php b/src/Illuminate/Filesystem/FilesystemManager.php index 10a04bc16aa8..9fb8a45dc0aa 100644 --- a/src/Illuminate/Filesystem/FilesystemManager.php +++ b/src/Illuminate/Filesystem/FilesystemManager.php @@ -192,6 +192,10 @@ public function createLocalDriver(array $config) */ public function createFtpDriver(array $config) { + if (! isset($config['root'])) { + $config['root'] = ''; + } + $adapter = new FtpAdapter(FtpConnectionOptions::fromArray($config)); return new FilesystemAdapter($this->createFlysystem($adapter, $config), $adapter, $config);