500 => L10n::t('Internal Server Error'),
503 => L10n::t('Service Unavailable'),
];
- $title = defaults($titles, $e->getCode(), 'Error ' . $e->getCode());
+ $title = ($titles[$e->getCode()] ?? '') ?: 'Error ' . $e->getCode();
if (empty($message)) {
// Explanations are taken from https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
503 => L10n::t('The server is currently unavailable (because it is overloaded or down for maintenance). Please try again later.'),
];
- $message = defaults($explanation, $e->getCode(), '');
+ $message = $explanation[$e->getCode()] ?? '';
}
- return ['$title' => $title, '$description' => $message];
+ return ['$title' => $title, '$message' => $message, '$back' => L10n::t('Go back')];
}
/**
* Displays a bare message page with no theming at all.
*
* @param \Friendica\Network\HTTPException $e
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \Exception
*/
public static function rawContent(\Friendica\Network\HTTPException $e)
{
*
* @param \Friendica\Network\HTTPException $e
* @return string
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \Exception
*/
public static function content(\Friendica\Network\HTTPException $e)
{