Skip to content

Commit 6d51c21

Browse files
authored
Exit through sendExit() (#9784)
That way it's testable.
1 parent 781f006 commit 6d51c21

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

program/actions/mail/get.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function run($args = [])
4848
. '<meta http-equiv="refresh" content="0; url=' . rcube::Q($url) . '">' . "\n"
4949
. '<meta http-equiv="content-type" content="text/html; charset=' . RCUBE_CHARSET . '">' . "\n"
5050
. "</head>\n<body>\n{$message}\n</body>\n</html>";
51-
exit;
51+
$rcmail->output->sendExit();
5252
}
5353

5454
$attachment = new rcmail_attachment_handler();
@@ -117,7 +117,7 @@ public function run($args = [])
117117
readfile($cache_file);
118118
}
119119

120-
exit;
120+
$rcmail->output->sendExit();
121121
}
122122
}
123123

@@ -213,7 +213,7 @@ public function run($args = [])
213213
$rcmail->output->write();
214214
}
215215

216-
exit;
216+
$rcmail->output->sendExit();
217217
}
218218
}
219219

@@ -265,7 +265,7 @@ public function run($args = [])
265265
}
266266

267267
$rcmail->output->write($out);
268-
exit;
268+
$rcmail->output->sendExit();
269269
}
270270

271271
// add filename extension if missing
@@ -295,12 +295,12 @@ public function run($args = [])
295295
$attachment->output($mimetype);
296296
}
297297

298-
exit;
298+
$rcmail->output->sendExit();
299299
}
300300

301301
// if we arrive here, the requested part was not found
302302
http_response_code(404);
303-
exit;
303+
$rcmail->output->sendExit();
304304
}
305305

306306
/**

0 commit comments

Comments
 (0)