diff --git a/lib/action.php b/lib/action.php index 68019ce108..71441a31ff 100644 --- a/lib/action.php +++ b/lib/action.php @@ -1457,6 +1457,8 @@ class Action extends HTMLOutputter // lawsuit break; default: common_log(LOG_ERR, 'Handled serverError ('._ve($code).') but cannot output into desired format ('._ve($this->format).'): '._ve($msg)); + $action = new ServerErrorAction($msg, $code); + $action->execute(); } exit((int)$code); @@ -1513,6 +1515,8 @@ class Action extends HTMLOutputter // lawsuit break; default: common_log(LOG_ERR, 'Handled clientError ('._ve($code).') but cannot output into desired format ('._ve($this->format).'): '._ve($msg)); + $action = new ClientErrorAction($msg, $code); + $action->execute(); } exit((int)$code); } diff --git a/lib/clienterroraction.php b/lib/clienterroraction.php index 37f722291e..c2e35e62ee 100644 --- a/lib/clienterroraction.php +++ b/lib/clienterroraction.php @@ -28,11 +28,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -require_once INSTALLDIR . '/lib/error.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * Class for displaying HTTP client errors diff --git a/lib/error.php b/lib/erroraction.php similarity index 100% rename from lib/error.php rename to lib/erroraction.php diff --git a/lib/servererroraction.php b/lib/servererroraction.php index c8e3067b82..2f9a6585c2 100644 --- a/lib/servererroraction.php +++ b/lib/servererroraction.php @@ -29,11 +29,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -require_once INSTALLDIR.'/lib/error.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * Class for displaying HTTP server errors