From:             
Operating system: all
PHP version:      5.3.2
Package:          Zlib Related
Bug Type:         Bug
Bug description:gzinflate return values don't match docs

Description:
------------
gzinflate is supposed to return false if it tries to inflate something
that's not 

valid deflated data. It does this on PHP 5.2, but returns an empty string
in 5.3.

This is either a docs problem or a BC break between 5.2 and 5.3. I can't
find 

anything in bugs, docs, release notes or the 5.2 to 5.3 upgrade guide about
this.

Test script:
---------------
<?php

$a = gzdeflate('abc');

$b = gzinflate($a);

var_dump($b);

$c = gzinflate('abc');

var_dump($c);

?>

Expected result:
----------------
(I get this under PHP 5.2.4 on linux)

string(3) "abc"

PHP Warning:  gzinflate(): buffer error in test.php on line 5

bool(false)

Actual result:
--------------
(I get this from PHP 5.3.2 built from MacPorts on OS X)

string(3) "abc"

string(0) ""

-- 
Edit bug report at http://bugs.php.net/bug.php?id=51650&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51650&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51650&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51650&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51650&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51650&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51650&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51650&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51650&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51650&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51650&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51650&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51650&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51650&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51650&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51650&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51650&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51650&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51650&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51650&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51650&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51650&r=mysqlcfg

Reply via email to