Bug #51650 [Opn->Bgs]: gzinflate return values don't match docs

From: Date: Sun, 09 May 2010 20:29:04 +0000
Subject: Bug #51650 [Opn->Bgs]: gzinflate return values don't match docs
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4344@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51650&edit=1 ID: 51650 Updated by: markskilbeck@php.net Reported by: marcus at synchromedia dot co dot uk Summary: gzinflate return values don't match docs -Status: Open +Status: Bogus Type: Bug Package: Documentation problem Operating System: all PHP Version: 5.2.14, 5.3.x New Comment: The documentation does not say that gzinflate will return false if the data passed has not been deflated. Previous Comments: ------------------------------------------------------------------------ [2010-04-23 18:32:27] felipe@php.net I can reproduce it on PHP 5.2.14-dev. ------------------------------------------------------------------------ [2010-04-23 17:21:05] marcus at synchromedia dot co dot uk 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 this bug report at http://bugs.php.net/bug.php?id=51650&edit=1

« previous php.doc.bugs (#4344) next »