From: Andrew Dolgov Date: Tue, 20 Mar 2012 10:45:43 +0000 (+0400) Subject: only enable ob_gzhandler if it exists X-Git-Tag: 1.5.11~25 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6a79e8afeb2038fa20796846fd1e2b64113112c3;p=tt-rss.git only enable ob_gzhandler if it exists --- diff --git a/api/index.php b/api/index.php index b8a6d4c4..fd59f4be 100644 --- a/api/index.php +++ b/api/index.php @@ -21,7 +21,9 @@ chdir(".."); - if (defined('ENABLE_GZIP_OUTPUT') && ENABLE_GZIP_OUTPUT) { + if (defined('ENABLE_GZIP_OUTPUT') && ENABLE_GZIP_OUTPUT && + function_exists("ob_gzhandler")) { + ob_start("ob_gzhandler"); } diff --git a/backend.php b/backend.php index 1337db5c..efc3793d 100644 --- a/backend.php +++ b/backend.php @@ -56,7 +56,7 @@ header("Content-Type: text/plain; charset=utf-8"); - if (ENABLE_GZIP_OUTPUT) { + if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) { ob_start("ob_gzhandler"); } diff --git a/public.php b/public.php index 8ffc8322..675a9e35 100644 --- a/public.php +++ b/public.php @@ -1,5 +1,5 @@