]> git.mxchange.org Git - friendica.git/commitdiff
Avoid "Cannot modify header information - headers already sent"
authorMichael <heluecht@pirati.ca>
Tue, 13 Nov 2018 20:20:54 +0000 (20:20 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 13 Nov 2018 20:20:54 +0000 (20:20 +0000)
mod/profile.php

index 218cc26e4b4f286232020fcaf73e5b6b2eb6271a..0dc592a9771fc08d730a83194f5a31926856ac2b 100644 (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();
                }
        }