php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #71259 bzopen(): more detailed description of the returned value and errors
Submitted: 2016-01-01 17:01 UTC Modified: 2016-01-02 00:57 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: salsi at icosaedro dot it Assigned:
Status: Open Package: Bzip2 Related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
17 - 9 = ?
Subscribe to this entry?

 
 [2016-01-01 17:01 UTC] salsi at icosaedro dot it
Description:
------------
The "Return Values" section about the bzopen() should explain in more details the possible returned values and errors:

- FALSE: failed to open or to create the file, or invalid mode specified. In this case an error of level E_WARNING is also triggered and the magic variable $php_errormsg is set (if enabled).

- resource: file succesfully opened or created. On reading, check if bzerrno($bz) != 0 for possible BZIP2 encoding errors that may happen if the read file is corrupted or is not a BZIP2 encoded file at all.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-02 00:57 UTC] requinix@php.net
-Package: Documentation problem +Package: Bzip2 Related
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Aug 12 07:01:25 2020 UTC