FIX: Remove shutdown function for error output (fixes #204)

This commit is contained in:
Loz Calver 2020-08-11 11:51:58 +01:00 committed by Loz Calver
parent 3be003218c
commit ff9127739b
1 changed files with 0 additions and 16 deletions

View File

@ -111,8 +111,6 @@ class HTTPBulkToolsResponse extends HTTPResponse
$this->removesRows = $removesRows;
$this->gridField = $gridfield;
register_shutdown_function(array($this, 'shutdown'));
parent::__construct(null, $statusCode);
}
@ -362,18 +360,4 @@ class HTTPBulkToolsResponse extends HTTPResponse
$this->createBody();
parent::outputBody();
}
/**
* Catches fatal PHP error and output something useful for the front end
*/
public function shutdown()
{
$error = error_get_last();
if ($error !== null ) {
$this->setMessage($error['message']);
$this->setStatusCode(500, $error['message']);
$this->outputBody();
exit();
}
}
}