From a87eba628ea5e43275174ce850dee178db6a5e24 Mon Sep 17 00:00:00 2001 From: Ali Akbar Azizi Date: Tue, 14 Dec 2021 12:54:04 +0330 Subject: [PATCH] Update FtpAdapter.php Add last error to readStream --- src/Ftp/FtpAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ftp/FtpAdapter.php b/src/Ftp/FtpAdapter.php index 976fa3841..bef0292ed 100644 --- a/src/Ftp/FtpAdapter.php +++ b/src/Ftp/FtpAdapter.php @@ -201,7 +201,7 @@ public function readStream(string $path) if ( ! $result) { fclose($stream); - throw UnableToReadFile::fromLocation($path); + throw UnableToReadFile::fromLocation($path, error_get_last()['message'] ?? ''); } rewind($stream);