From 7f3b5c1a724016501b9b994ef16a90da7e9c435d Mon Sep 17 00:00:00 2001 From: lemon-juice Date: Tue, 16 Nov 2021 10:18:48 +0100 Subject: [PATCH] Fix for wrong type passed to moveTo() --- Factory/UploadedFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Factory/UploadedFile.php b/Factory/UploadedFile.php index 53aa37a..b951045 100644 --- a/Factory/UploadedFile.php +++ b/Factory/UploadedFile.php @@ -61,7 +61,7 @@ public function move($directory, $name = null): File $target = $this->getTargetFile($directory, $name); try { - $this->psrUploadedFile->moveTo($target); + $this->psrUploadedFile->moveTo((string) $target); } catch (\RuntimeException $e) { throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, $e->getMessage()), 0, $e); }