diff options
author | Evan Prodromou <evan@status.net> | 2009-09-29 17:43:45 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-09-29 17:43:45 -0400 |
commit | 5252c438040f071e0c61a9c93152dcf1aa382504 (patch) | |
tree | 6b454e51938b380f5e8e6342bd323f04574c9eb8 /lib/servererroraction.php | |
parent | 155ba6c103b3672656937ad36bec02cb9c7834e5 (diff) |
move HTTP error code strings to class variables
Diffstat (limited to 'lib/servererroraction.php')
-rw-r--r-- | lib/servererroraction.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/servererroraction.php b/lib/servererroraction.php index c6400605e..0993a63bc 100644 --- a/lib/servererroraction.php +++ b/lib/servererroraction.php @@ -55,17 +55,17 @@ require_once INSTALLDIR.'/lib/error.php'; class ServerErrorAction extends ErrorAction { + static $status = array(500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported'); + function __construct($message='Error', $code=500) { parent::__construct($message, $code); - $this->status = array(500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported'); - $this->default = 500; // Server errors must be logged. @@ -93,9 +93,4 @@ class ServerErrorAction extends ErrorAction $this->showPage(); } - - function title() - { - return $this->status[$this->code]; - } } |