Merge pull request #6127 from annando/notice

Avoid "Cannot modify header information - headers already sent"
This commit is contained in:
Tobias Diekershoff 2018-11-14 10:20:47 +01:00 committed by GitHub
commit b0d8a2fcd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,8 +59,8 @@ function profile_init(App $a)
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $which]);
if (DBA::isResult($user)) {
$data = ActivityPub\Transmitter::getProfile($user['uid']);
echo json_encode($data);
header('Content-Type: application/activity+json');
echo json_encode($data);
exit();
}
}