From d44a0fa0f028c3319951279b90c16be915fb4b91 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Thu, 6 Jun 2024 14:20:54 +0200 Subject: [PATCH] Exit through sendExit() That way it's testable. --- program/actions/mail/get.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/program/actions/mail/get.php b/program/actions/mail/get.php index 2882de621f..73bcdeaf36 100644 --- a/program/actions/mail/get.php +++ b/program/actions/mail/get.php @@ -48,7 +48,7 @@ public function run($args = []) . '' . "\n" . '' . "\n" . "\n\n{$message}\n\n"; - exit; + $rcmail->output->sendExit(); } $attachment = new rcmail_attachment_handler(); @@ -117,7 +117,7 @@ public function run($args = []) readfile($cache_file); } - exit; + $rcmail->output->sendExit(); } } @@ -213,7 +213,7 @@ public function run($args = []) $rcmail->output->write(); } - exit; + $rcmail->output->sendExit(); } } @@ -265,7 +265,7 @@ public function run($args = []) } $rcmail->output->write($out); - exit; + $rcmail->output->sendExit(); } // add filename extension if missing @@ -295,12 +295,12 @@ public function run($args = []) $attachment->output($mimetype); } - exit; + $rcmail->output->sendExit(); } // if we arrive here, the requested part was not found http_response_code(404); - exit; + $rcmail->output->sendExit(); } /**