Skip to content

Commit

Permalink
Exit through sendExit() (#9784)
Browse files Browse the repository at this point in the history
That way it's testable.
  • Loading branch information
pabzm authored Feb 19, 2025
1 parent 781f006 commit 6d51c21
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions program/actions/mail/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function run($args = [])
. '<meta http-equiv="refresh" content="0; url=' . rcube::Q($url) . '">' . "\n"
. '<meta http-equiv="content-type" content="text/html; charset=' . RCUBE_CHARSET . '">' . "\n"
. "</head>\n<body>\n{$message}\n</body>\n</html>";
exit;
$rcmail->output->sendExit();
}

$attachment = new rcmail_attachment_handler();
Expand Down Expand Up @@ -117,7 +117,7 @@ public function run($args = [])
readfile($cache_file);
}

exit;
$rcmail->output->sendExit();
}
}

Expand Down Expand Up @@ -213,7 +213,7 @@ public function run($args = [])
$rcmail->output->write();
}

exit;
$rcmail->output->sendExit();
}
}

Expand Down Expand Up @@ -265,7 +265,7 @@ public function run($args = [])
}

$rcmail->output->write($out);
exit;
$rcmail->output->sendExit();
}

// add filename extension if missing
Expand Down Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 6d51c21

Please sign in to comment.