]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsub.php
Using the standard function to return http errors
[friendica.git] / mod / pubsub.php
index f0a8d463c4517999d29773112e2aff9b45a4df13..cb6738ada33ed3ce7f5a3e542cadc078440bbdec 100644 (file)
@@ -7,6 +7,7 @@ use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Protocol\OStatus;
 use Friendica\Util\Strings;
+use Friendica\Core\System;
 
 require_once 'include/items.php';
 
@@ -16,7 +17,7 @@ function hub_return($valid, $body)
                header($_SERVER["SERVER_PROTOCOL"] . ' 200 OK');
                echo $body;
        } else {
-               header($_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
+               System::httpExit(404, ['title' => L10n::t('Not found.')]);
        }
        killme();
 }