From 36d5b1a83d9823d581f4d29c88b7b7b63bb561a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 17 Jan 2017 14:45:47 +0100 Subject: [PATCH] Wrap background job execution in an output buffer --- .../lib/system/background/BackgroundQueueHandler.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php index 686a613d32..c2b62efd1d 100644 --- a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php +++ b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php @@ -89,6 +89,9 @@ class BackgroundQueueHandler extends SingletonFactory { try { SessionHandler::getInstance()->changeUser(new User(null), true); + if (!WCF::debugModeIsEnabled()) { + ob_start(); + } $job->perform(); } catch (\Throwable $e) { @@ -124,6 +127,9 @@ class BackgroundQueueHandler extends SingletonFactory { } } finally { + if (!WCF::debugModeIsEnabled()) { + ob_end_clean(); + } SessionHandler::getInstance()->changeUser($user, true); } } -- 2.20.1