mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Catch type error.
This commit is contained in:
@@ -9,8 +9,9 @@ use FireflyIII\Models\Attachment;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
use Input;
|
use Input;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
|
use TypeError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AttachmentHelper
|
* Class AttachmentHelper
|
||||||
@@ -75,9 +76,9 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
*/
|
*/
|
||||||
public function saveAttachmentsForModel(Model $model)
|
public function saveAttachmentsForModel(Model $model)
|
||||||
{
|
{
|
||||||
$files = null;
|
$files = null;
|
||||||
try {
|
try {
|
||||||
if(Input::hasFile('attachments')) {
|
if (Input::hasFile('attachments')) {
|
||||||
$files = Input::file('attachments');
|
$files = Input::file('attachments');
|
||||||
}
|
}
|
||||||
} catch (TypeError $e) {
|
} catch (TypeError $e) {
|
||||||
|
Reference in New Issue
Block a user