Skip to content

Commit

Permalink
FIX Don't pass null as LeftAndMain error message. (#1335)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Aug 1, 2022
1 parent 38c1ae2 commit a441d91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/AdminErrorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AdminErrorExtension extends Extension
public function onBeforeHTTPError($statusCode, HTTPRequest $request, $errorMessage = null)
{
$controller = $this->getAdminController();
if (!$controller || Director::is_ajax($request)) {
if (!$controller || Director::is_ajax($request) || $errorMessage === null) {
return;
}
$controller->setHttpErrorMessage($errorMessage);
Expand Down

0 comments on commit a441d91

Please sign in to comment.