mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-24 04:41:01 +00:00
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user