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); }