From 4e9d129dd3af21b27617e73af7287133d2ee12f7 Mon Sep 17 00:00:00 2001 From: Art4 Date: Fri, 22 Nov 2024 11:02:27 +0000 Subject: [PATCH] remove unnecessary finally blocks --- src/BaseModule.php | 4 ++-- src/Module/Settings/RemoveMe.php | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/BaseModule.php b/src/BaseModule.php index a98da3a088..a1f4c033c6 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -245,10 +245,10 @@ abstract class BaseModule implements ICanHandleRequests $this->response->setStatus($e->getCode(), $e->getMessage()); $this->response->addContent($httpException->content($e)); - } finally { - $this->profiler->set(microtime(true) - $timestamp, 'content'); } + $this->profiler->set(microtime(true) - $timestamp, 'content'); + return $this->response->generate(); } diff --git a/src/Module/Settings/RemoveMe.php b/src/Module/Settings/RemoveMe.php index 59165bccba..cae57d2f0f 100644 --- a/src/Module/Settings/RemoveMe.php +++ b/src/Module/Settings/RemoveMe.php @@ -92,8 +92,6 @@ class RemoveMe extends BaseSettings $this->baseUrl->redirect(); } catch (\RuntimeException $e) { $this->systemMessages->addNotice($e->getMessage()); - } finally { - return; } }