X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ferror.php;h=a6a29119f7f612046f2f2c0075167c5d03acef84;hb=71151b2583d81e28c5f5d42a690c649f4e84f3bf;hp=87a4d913b41b1287f7af821926c5a8dea82a8439;hpb=51f0dd5e37db0e8d2a8690655555d399249942df;p=quix0rs-gnu-social.git diff --git a/lib/error.php b/lib/error.php index 87a4d913b4..a6a29119f7 100644 --- a/lib/error.php +++ b/lib/error.php @@ -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();