From 5bf6151436f1270d1261f3dd61969bfcba254530 Mon Sep 17 00:00:00 2001 From: dizzy Date: Thu, 28 Nov 2024 05:50:30 -0800 Subject: [PATCH] try to set zlib.output_compression to avoid showing the technical error to users when we can change the setting ourselves (#1223) --- .phpcs.xml.dist | 1 + app/bootstrap.php | 6 ++++++ classes/WpMatomo/Admin/SystemReport.php | 3 +++ 3 files changed, 10 insertions(+) diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 2285dc731..2704113d3 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -60,6 +60,7 @@ + diff --git a/app/bootstrap.php b/app/bootstrap.php index d6461db07..3e63e554b 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -1,5 +1,11 @@ ! empty( $disabled_functions ) ? $disabled_functions : '', ]; + // try to set it before checking, since we try to set it in /app/bootstrap.php + @ini_set( 'zlib.output_compression', false ); + $zlib_compression = ini_get( 'zlib.output_compression' ); $row = [ 'name' => 'zlib.output_compression is off',