Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Bad redirect when editing a not found transaction.
James Colea346b6ee297e
diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.phpindex b5221eca31..ad41f1dbde 100644--- a/app/Exceptions/GracefulNotFoundHandler.php+++ b/app/Exceptions/GracefulNotFoundHandler.php@@ -51,8 +51,8 @@ class GracefulNotFoundHandler extends ExceptionHandler* @param Request $request* @param Exception $exception*- * @throws Exception* @return mixed+ * @throws Exception*/public function render($request, Throwable $exception){@@ -75,7 +75,6 @@ class GracefulNotFoundHandler extends ExceptionHandlerreturn $this->handleAccount($request, $exception);case 'transactions.show':return $this->handleGroup($request, $exception);- break;case 'attachments.show':case 'attachments.edit':// redirect to original attachment holder.@@ -128,19 +127,21 @@ class GracefulNotFoundHandler extends ExceptionHandlercase 'transactions.mass.edit':case 'transactions.mass.delete':case 'transactions.bulk.edit':- $request->session()->reflash();-- return redirect(route('index'));- break;+ if ('POST' === $request->method()) {+ $request->session()->reflash();+ return redirect(route('index'));+ }+ return parent::render($request, $exception);}+}/*** @param Request $request* @param Throwable $exception*- * @throws Exception* @return Redirector|Response+ * @throws Exception*/private function handleAccount(Request $request, Throwable $exception){@@ -167,8 +168,8 @@ class GracefulNotFoundHandler extends ExceptionHandler* @param Request $request* @param Throwable $exception*- * @throws Exception* @return RedirectResponse|Redirector|Response+ * @throws Exception*/private function handleAttachment(Request $request, Throwable $exception){@@ -209,11 +210,11 @@ class GracefulNotFoundHandler extends ExceptionHandler}/**- * @param Throwable $request+ * @param Throwable $request* @param Exception $exception*- * @throws Exception* @return RedirectResponse|\Illuminate\Http\Response|Redirector|Response+ * @throws Exception*/private function handleGroup(Request $request, Throwable $exception){