X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fclienterroraction.php;h=0c48414d55f066c774c2e41a4aebc6b3ec98b0d4;hb=af4b18b1e2ef8aded26fc4788c571012da04d1cf;hp=5019dc06deb7ec9bc18f8dd8a3d626be0fa02af9;hpb=0356953cf853bf3bc9eda66f88b5ef4718683337;p=quix0rs-gnu-social.git diff --git a/lib/clienterroraction.php b/lib/clienterroraction.php index 5019dc06de..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', @@ -72,7 +72,7 @@ class ClientErrorAction extends ErrorAction } // 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]; + } }