X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ferror.php;h=a6a29119f7f612046f2f2c0075167c5d03acef84;hb=9109fe3c631ebef14f2de061fc6fc565ee0f7174;hp=87a4d913b41b1287f7af821926c5a8dea82a8439;hpb=78fc9483d4d1fde4561905edf6594b86c4dc374e;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();