mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Possible fix for attachment helper
This commit is contained in:
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
use Input;
|
use Input;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AttachmentHelper
|
* Class AttachmentHelper
|
||||||
@@ -75,9 +76,14 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
public function saveAttachmentsForModel(Model $model)
|
public function saveAttachmentsForModel(Model $model)
|
||||||
{
|
{
|
||||||
$files = null;
|
$files = null;
|
||||||
|
try {
|
||||||
if(Input::hasFile('attachments')) {
|
if(Input::hasFile('attachments')) {
|
||||||
$files = Input::file('attachments');
|
$files = Input::file('attachments');
|
||||||
}
|
}
|
||||||
|
} catch (Error $e) {
|
||||||
|
// Log it, do nothing else.
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($files)) {
|
if (is_array($files)) {
|
||||||
foreach ($files as $entry) {
|
foreach ($files as $entry) {
|
||||||
|
Reference in New Issue
Block a user