]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/error.php
OStatus: garbage collect unused PuSH subscriptions when the last local subscriber...
[quix0rs-gnu-social.git] / lib / error.php
index 87a4d913b41b1287f7af821926c5a8dea82a8439..a6a29119f7f612046f2f2c0075167c5d03acef84 100644 (file)
@@ -56,6 +56,7 @@ class ErrorAction extends Action
 
         $this->code = $code;
         $this->message = $message;
+        $this->minimal = StatusNet::isApi();
 
         // XXX: hack alert: usually we aren't going to
         // call this page directly, but because it's
@@ -102,7 +103,14 @@ class ErrorAction extends Action
 
     function showPage()
     {
-        parent::showPage();
+        if ($this->minimal) {
+            // Even more minimal -- we're in a machine API
+            // and don't want to flood the output.
+            $this->extraHeaders();
+            $this->showContent();
+        } else {
+            parent::showPage();
+        }
 
         // We don't want to have any more output after this
         exit();