Bug->Doc #71258 [Opn]: bzread(): detailed description of the returned values and errors
| From: | salsi at icosaedro dot it | Date: | Fri, 01 Jan 2016 18:24:30 +0000 |
| Subject: | Bug->Doc #71258 [Opn]: bzread(): detailed description of the returned values and errors | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13057@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71258&edit=1
ID: 71258
User updated by: salsi at icosaedro dot it
Reported by: salsi at icosaedro dot it
Summary: bzread(): detailed description of the returned
values and errors
Status: Open
-Type: Bug
+Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Fix my report: Bug --> Documentation Problem.
Previous Comments:
------------------------------------------------------------------------
[2016-01-01 16:38:50] salsi at icosaedro dot it
Description:
------------
The "return value" section of the page describing bzread() shoutd explain more in detail
what really this function may return:
- FALSE: error reading from the stream. An error of level E_WARNING is also raised in this case; you
may retrieve the text of the error message from the $php_errormsg magic variable, if enabled.
- Empty string: end of the file or BZIP2 deconding error. Use feof($bz) to detect the first case,
and use bzerrno($bz) != 0 to detect the latter.
- Non empty string: decoded data. Check bzerror($bz) != 0 for possible BZIP2 decoding errors. Data
may still be garbage because the BZIP2 checksum is checked only after a whole block of BZIP2 data
has been read or at the end of the stream, so in general data read cannot be trusted until the whole
content of the file has been read.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71258&edit=1