From 26b7180874cd6e7adfb6604648fae308a40fb38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Mon, 13 Aug 2018 16:01:40 +0200 Subject: [PATCH] [ticket/14285] Move exit inside callback so the controller can return a response PHPBB3-14285 --- phpBB/phpbb/storage/controller/controller.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/storage/controller/controller.php b/phpBB/phpbb/storage/controller/controller.php index 4f1c407533..f2bc16ad0a 100644 --- a/phpBB/phpbb/storage/controller/controller.php +++ b/phpBB/phpbb/storage/controller/controller.php @@ -85,11 +85,7 @@ class controller throw new http_exception(500, 'Headers already sent'); } - $this->response->send(); - - // Terminate script to avoid the execution of terminate events - // This avoid possible errors with db connection closed - exit; + return $this->response; } /** @@ -167,6 +163,10 @@ class controller fclose($fp); fclose($output); flush(); + + // Terminate script to avoid the execution of terminate events + // This avoid possible errors with db connection closed + exit; }); $this->response->isNotModified($this->symfony_request);