From 855b3070bb987cfaad2d54119c42c66736147a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 18 Dec 2022 20:55:38 +0100 Subject: [PATCH] Fix exception when creating an attachment without an file., --- src/Services/Attachments/AttachmentSubmitHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/Attachments/AttachmentSubmitHandler.php b/src/Services/Attachments/AttachmentSubmitHandler.php index 9640d4b0..4dcf1a65 100644 --- a/src/Services/Attachments/AttachmentSubmitHandler.php +++ b/src/Services/Attachments/AttachmentSubmitHandler.php @@ -223,7 +223,7 @@ class AttachmentSubmitHandler //Determine the old filepath $old_path = $this->pathResolver->placeholderToRealPath($attachment->getPath()); - if (!file_exists($old_path)) { + if (empty($old_path) || !file_exists($old_path)) { return $attachment; } $filename = basename($old_path);