mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
Merge pull request #205 from kinglozzer/no-shutdown
FIX: Remove shutdown function for error output (fixes #204)
This commit is contained in:
commit
d51a26a872
@ -111,8 +111,6 @@ class HTTPBulkToolsResponse extends HTTPResponse
|
||||
$this->removesRows = $removesRows;
|
||||
$this->gridField = $gridfield;
|
||||
|
||||
register_shutdown_function(array($this, 'shutdown'));
|
||||
|
||||
parent::__construct(null, $statusCode);
|
||||
}
|
||||
|
||||
@ -364,16 +362,10 @@ class HTTPBulkToolsResponse extends HTTPResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* Catches fatal PHP error and output something useful for the front end
|
||||
* @deprecated 3.1.0 This function was used to catch PHP Errors and inject additional information in the response
|
||||
*/
|
||||
public function shutdown()
|
||||
{
|
||||
$error = error_get_last();
|
||||
if ($error !== null ) {
|
||||
$this->setMessage($error['message']);
|
||||
$this->setStatusCode(500, $error['message']);
|
||||
$this->outputBody();
|
||||
exit();
|
||||
}
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user