Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Better attachment handling.
James Cole92799699bc68
diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.phpindex 9895f6e2d1..ff62f2fb4c 100644--- a/app/Helpers/Attachments/AttachmentHelper.php+++ b/app/Helpers/Attachments/AttachmentHelper.php@@ -60,10 +60,14 @@ class AttachmentHelper implements AttachmentHelperInterface{$files = Input::file('attachments');- foreach ($files as $entry) {- if (!is_null($entry)) {- $this->processFile($entry, $model);+ if (is_array($files)) {+ foreach ($files as $entry) {+ if (!is_null($entry)) {+ $this->processFile($entry, $model);+ }}+ } else {+ $this->processFile($files, $model);}return true;diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.phpindex 69ba05f14f..c2545c41e9 100644--- a/app/Http/Controllers/AttachmentController.php+++ b/app/Http/Controllers/AttachmentController.php@@ -119,6 +119,8 @@ class AttachmentController extends Controller/*** @param Attachment $attachment+ *+ * @return \Illuminate\Http\Response*/public function preview(Attachment $attachment){