From 6a5cc0c6fa48ef448b8763ff625df587e6fde3ec Mon Sep 17 00:00:00 2001 From: Danilo Pucci Date: Tue, 26 Dec 2023 17:38:45 -0800 Subject: [PATCH] - adding check before flush buffer --- install/tools/5-database.php | 6 ++++-- install/tools/7-finish.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/install/tools/5-database.php b/install/tools/5-database.php index 8188bd1ce9..4ebaf37a6e 100644 --- a/install/tools/5-database.php +++ b/install/tools/5-database.php @@ -11,8 +11,10 @@ require BASE . 'install/includes/config.php'; ini_set('max_execution_time', 300); -ob_implicit_flush(); -ob_end_flush(); +if(ob_get_length() > 0) { + ob_implicit_flush(); + ob_end_flush(); +} header('X-Accel-Buffering: no'); if(!$error) { diff --git a/install/tools/7-finish.php b/install/tools/7-finish.php index 85c8768b2b..a7638fd57c 100644 --- a/install/tools/7-finish.php +++ b/install/tools/7-finish.php @@ -8,8 +8,10 @@ require BASE . 'install/includes/locale.php'; ini_set('max_execution_time', 300); -ob_implicit_flush(); -ob_end_flush(); +if(ob_get_length() > 0) { + ob_implicit_flush(); + ob_end_flush(); +} header('X-Accel-Buffering: no'); /* if(isset($config['installed']) && $config['installed'] && !isset($_SESSION['saved'])) {