X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fclienterroraction.php;h=0c48414d55f066c774c2e41a4aebc6b3ec98b0d4;hb=6658e2a2ee9517bebd59cf69d7483e6eda691b4e;hp=ef6fd51dffc16f3dc5b4df82743c9bd460842a06;hpb=fbd1cf4dfa452166a5985d9a9177d57e8554f09f;p=quix0rs-gnu-social.git diff --git a/lib/clienterroraction.php b/lib/clienterroraction.php index ef6fd51dff..0c48414d55 100644 --- a/lib/clienterroraction.php +++ b/lib/clienterroraction.php @@ -49,7 +49,7 @@ class ClientErrorAction extends ErrorAction function __construct($message='Error', $code=400) { parent::__construct($message, $code); - + $this->status = array(400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', @@ -70,9 +70,9 @@ class ClientErrorAction extends ErrorAction 417 => 'Expectation Failed'); $this->default = 400; } - + // XXX: Should these error actions even be invokable via URI? - + function handle($args) { parent::handle($args); @@ -84,11 +84,16 @@ class ClientErrorAction extends ErrorAction } $this->message = $this->trimmed('message'); - + if (!$this->message) { - $this->message = "Client Error $this->code"; - } + $this->message = "Client Error $this->code"; + } $this->showPage(); } + + function title() + { + return $this->status[$this->code]; + } }