]> git.wh0rd.org - tt-rss.git/commitdiff
only enable ob_gzhandler if it exists
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 20 Mar 2012 10:45:43 +0000 (14:45 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 20 Mar 2012 10:45:43 +0000 (14:45 +0400)
api/index.php
backend.php
public.php

index b8a6d4c4a5807f924879abb4b97c19de54710fd2..fd59f4bee94ede410e32e8c51de4da953739da99 100644 (file)
@@ -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");
        }
 
index 1337db5c2e86cc8eca2d57ba3246cacd4ad0152e..efc3793d303213ff0c0ef349392f988b52383653 100644 (file)
@@ -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");
        }
 
index 8ffc83224f170a51c3a89f175848e6bccdb291f4..675a9e352d9a6a413b60045c661695e82a9c9095 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-       set_include_path(get_include_path() . PATH_SEPARATOR . 
+       set_include_path(get_include_path() . PATH_SEPARATOR .
                dirname(__FILE__) . "/include");
 
        /* remove ill effects of magic quotes */
@@ -34,7 +34,7 @@
 
        if (!init_connection($link)) return;
 
-       if (ENABLE_GZIP_OUTPUT) {
+       if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) {
                ob_start("ob_gzhandler");
        }