ErrorHandler: fix longstanding typo, occur*r*ed
This commit is contained in:
parent
f5721c3af7
commit
6150922a1f
@ -131,7 +131,7 @@ class ErrorHandler
|
||||
]))
|
||||
{
|
||||
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
||||
echo '<h2>An Error Occured</h2><p>Our software could not connect to the database. We apologise for any inconvenience and ask you to check back later.</p>';
|
||||
echo '<h2>An Error Occurred</h2><p>Our software could not connect to the database. We apologise for any inconvenience and ask you to check back later.</p>';
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -156,18 +156,18 @@ class ErrorHandler
|
||||
elseif (!$is_sensitive)
|
||||
echo json_encode(['error' => $message]);
|
||||
else
|
||||
echo json_encode(['error' => 'Our apologies, an error occured while we were processing your request. Please try again later, or contact us if the problem persists.']);
|
||||
echo json_encode(['error' => 'Our apologies, an error occurred while we were processing your request. Please try again later, or contact us if the problem persists.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Initialise the main template to present a nice message to the user.
|
||||
$page = new MainTemplate('An error occured!');
|
||||
$page = new MainTemplate('An error occurred!');
|
||||
|
||||
// Show the error.
|
||||
$is_admin = Registry::has('user') && Registry::get('user')->isAdmin();
|
||||
if (DEBUG || $is_admin)
|
||||
{
|
||||
$page->adopt(new DummyBox('An error occured!', '<p>' . $message . '</p><pre>' . $debug_info . '</pre>'));
|
||||
$page->adopt(new DummyBox('An error occurred!', '<p>' . $message . '</p><pre>' . $debug_info . '</pre>'));
|
||||
|
||||
// Let's provide the admin navigation despite it all!
|
||||
if ($is_admin)
|
||||
@ -176,9 +176,9 @@ class ErrorHandler
|
||||
}
|
||||
}
|
||||
elseif (!$is_sensitive)
|
||||
$page->adopt(new DummyBox('An error occured!', '<p>' . $message . '</p>'));
|
||||
$page->adopt(new DummyBox('An error occurred!', '<p>' . $message . '</p>'));
|
||||
else
|
||||
$page->adopt(new DummyBox('An error occured!', '<p>Our apologies, an error occured while we were processing your request. Please try again later, or contact us if the problem persists.</p>'));
|
||||
$page->adopt(new DummyBox('An error occurred!', '<p>Our apologies, an error occurred while we were processing your request. Please try again later, or contact us if the problem persists.</p>'));
|
||||
|
||||
// If we got this far, make sure we're not showing stuff twice.
|
||||
ob_end_clean();
|
||||
|
Loading…
Reference in New Issue
Block a user