Fixed exceptions occuring cause of strict_types.

This commit is contained in:
Jan Böhmer 2020-01-05 21:09:19 +01:00
parent fe0f69f762
commit 67a0dc8131
2 changed files with 8 additions and 2 deletions

View file

@ -105,7 +105,13 @@ class AttachmentManager
return false;
}
return file_exists($this->toAbsoluteFilePath($attachment)) || $attachment->isExternal();
$absolute_path = $this->toAbsoluteFilePath($attachment);
if ($absolute_path === null) {
return false;
}
return file_exists($absolute_path) || $attachment->isExternal();
}
/**