summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/error.php8
-rw-r--r--lib/servererroraction.php5
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/error.php b/lib/error.php
index bbf9987cf..3127c83fe 100644
--- a/lib/error.php
+++ b/lib/error.php
@@ -72,7 +72,7 @@ class ErrorAction extends Action
$status_string = $this->status[$this->code];
header('HTTP/1.1 '.$this->code.' '.$status_string);
}
-
+
/**
* Display content.
*
@@ -97,11 +97,11 @@ class ErrorAction extends Action
{
return true;
}
-
- function showPage()
+
+ function showPage()
{
parent::showPage();
-
+
// We don't want to have any more output after this
exit();
}
diff --git a/lib/servererroraction.php b/lib/servererroraction.php
index db7352166..c46f3228b 100644
--- a/lib/servererroraction.php
+++ b/lib/servererroraction.php
@@ -52,6 +52,7 @@ require_once INSTALLDIR.'/lib/error.php';
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://laconi.ca/
*/
+
class ServerErrorAction extends ErrorAction
{
function __construct($message='Error', $code=500)
@@ -66,6 +67,10 @@ class ServerErrorAction extends ErrorAction
505 => 'HTTP Version Not Supported');
$this->default = 500;
+
+ // Server errors must be logged.
+
+ common_log(LOG_ERR, "ServerErrorAction: $code $message");
}
// XXX: Should these error actions even be invokable via URI?