From ff9127739b930824a29d0ecb2494d7ed26175b73 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Tue, 11 Aug 2020 11:51:58 +0100 Subject: [PATCH] FIX: Remove shutdown function for error output (fixes #204) --- src/BulkTools/HTTPBulkToolsResponse.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/BulkTools/HTTPBulkToolsResponse.php b/src/BulkTools/HTTPBulkToolsResponse.php index ad830e3..cdcb3a4 100644 --- a/src/BulkTools/HTTPBulkToolsResponse.php +++ b/src/BulkTools/HTTPBulkToolsResponse.php @@ -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(); - } - } }