summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/render.inc.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/inc/render.inc.php b/inc/render.inc.php
index 4318a95..c606fd8 100644
--- a/inc/render.inc.php
+++ b/inc/render.inc.php
@@ -32,10 +32,10 @@ class Render
/**
* Output the buffered, generated page
*/
- public static function output()
+ public static function output(): void
{
Header('Content-Type: text/html; charset=utf-8');
- $zip = isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false);
+ $zip = isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (str_contains($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'));
if ($zip)
ob_start();
echo
@@ -74,8 +74,7 @@ class Render
ob_implicit_flush(false);
$gzip_contents = ob_get_contents();
ob_end_clean();
- echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
- echo substr(gzcompress($gzip_contents, 5), 0, -4);
+ echo gzcompress($gzip_contents, 5, ZLIB_ENCODING_GZIP);
}
}