mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 04:08:57 +02:00
Fix exception when creating an attachment without an file.,
This commit is contained in:
parent
8ae4e9fe05
commit
07b399763a
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue