| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2006-02-25 10:22 UTC] lunter at interia dot pl
 Description:
------------
ob_gzhandler does't return $i parametr when browser does't support gzip/deflate compression
Reproduce code:
---------------
<?
 function a($i,$m){
  $i=strtolower($i);
  $i=ob_gzhandler($i,$m);
  return($i);
 }
 ob_start('a');
?>
PAGE CONTENTS
Expected result:
----------------
send buffer in lower case
Actual result:
--------------
send buffer in UPPER case when browser does't support gzip/deflate compression
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 13:00:02 2025 UTC | 
OK, I solved the proble. Corrent script: <? function a($i,$m){ $i=strtolower($i); $m=ob_gzhandler($i,$m); if($m!==false){$i=$m;} return($i); } ob_start('a'); ?> PAGE CONTENTS But there are two issues with documentation: 1. http://php.net/manual/en/function.ob-gzhandler.php There is not written what ob-gzhandler return boolean false if browser does't support gzip/deflate compression. Without this sentence you may think that ob-gzhandler return uncompressed input string. 2. http://php.net/manual/en/function.ob-start.php There is not written what if ob_start output_callback is a callable function and this function return boolean false, ob_start return original buffer.