Skip to content

Commit 39935d1

Browse files
committed
always close output buffer
1 parent deb35a9 commit 39935d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/unit/AjaxSshValidateTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ public function testSshValidate(bool $is_valid, string $pubkey)
2424
$_SERVER["REQUEST_METHOD"] = "POST";
2525
$_POST["key"] = $pubkey;
2626
ob_start();
27-
include __DIR__ . "/../../webroot/js/ajax/ssh_validate.php";
28-
$output = ob_get_clean();
27+
try {
28+
include __DIR__ . "/../../webroot/js/ajax/ssh_validate.php";
29+
} finally {
30+
$output = ob_get_clean();
31+
}
2932
if ($is_valid) {
3033
$this->assertEquals("true", $output);
3134
} else {

0 commit comments

Comments
 (0)