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());
|
||||
|
||||
@@ -312,6 +312,9 @@ class TagController extends Controller
|
||||
if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) {
|
||||
$request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments'));
|
||||
}
|
||||
if (count($this->attachmentsHelper->getErrors()->get('attachments')) > 0) {
|
||||
$request->session()->flash('error', $this->attachmentsHelper->getErrors()->get('attachments'));
|
||||
}
|
||||
$redirect = redirect($this->getPreviousUrl('tags.create.url'));
|
||||
if (1 === (int)$request->get('create_another')) {
|
||||
session()->put('tags.create.fromStore', true);
|
||||
@@ -347,6 +350,9 @@ class TagController extends Controller
|
||||
if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) {
|
||||
$request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments'));
|
||||
}
|
||||
if (count($this->attachmentsHelper->getErrors()->get('attachments')) > 0) {
|
||||
$request->session()->flash('error', $this->attachmentsHelper->getErrors()->get('attachments'));
|
||||
}
|
||||
$redirect = redirect($this->getPreviousUrl('tags.edit.url'));
|
||||
if (1 === (int)$request->get('return_to_edit')) {
|
||||
session()->put('tags.edit.fromUpdate', true);
|
||||
|
||||
Reference in New Issue
Block a user