php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30318 Bzip2 warning required
Submitted: 2004-10-04 13:45 UTC Modified: 2004-10-04 14:09 UTC
From: aidan@php.net Assigned:
Status: Not a bug Package: Livedocs problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: aidan@php.net
New email:
PHP Version: OS:

 

 [2004-10-04 13:45 UTC] aidan@php.net
Description:
------------
This patch adds a check to ensure the bzip2 compression stream is enabled before using it.

Actual result:
--------------
--- livedocs\mk_notes.1.4.php	Thu Aug 19 06:56:57 2004
+++ livedocs\mk_notes.php	Wed Sep 08 09:35:08 2004
@@ -21,6 +21,14 @@
 //
 // $Id: mk_notes.php,v 1.4 2004/08/18 20:56:57 iliaa Exp $
 
+// Check the compress.bzip2 stream is enabled
+if (!in_array('compress.bzip2', stream_get_wrappers())) {
+    echo "Warning: Unable to build user notes: The bzip2 stream is not enabled.\n";
+    echo "You must build with --with-bz2.\n";
+    echo "####################\n\n";
+    return false;
+}
+
 $create = <<

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-04 13:51 UTC] derick@php.net
No bug here, this should go into the README instead.
 [2004-10-04 13:58 UTC] aidan@php.net
Here's the patch formatted correctly:

http://www.powertrip.co.za/livedocs/viewpatch.php?patch=7
 [2004-10-04 14:07 UTC] aidan@php.net
Failing to intialise a variable before using it IS a bug, I don't see how this is any different.

This patch ensures that the bzip2 compression stream is enabled before it is used. This patch will stop error notices being spewed over manual pages. The informative message could be omited, but as there is already a bug regarding this exact problem (#29521) I cannot see why it would be a problem.

I ofcourse agree with Derick, it should ALSO go in the readme.
 [2004-10-04 14:09 UTC] derick@php.net
It still should not be checked here - perhaps in configure though.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 20:01:23 2020 UTC