James Cole
2024-03-16 06:25:56 +01:00
parent 7680c8733f
commit 060c9648f1
3 changed files with 186 additions and 178 deletions

View File

@@ -236,7 +236,8 @@ class AttachmentHelper implements AttachmentHelperInterface
$fileObject->rewind();
if (0 === $file->getSize()) {
throw new FireflyException('Cannot upload empty or non-existent file.');
$this->errors->add('attachments', trans('validation.file_zero_length'));
return null;
}
$content = (string)$fileObject->fread($file->getSize());