File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ PHP NEWS
21
21
. Fixed bug #79368 ("Unexpected end of file" is not an acceptable error
22
22
message). (Alex Dowad)
23
23
24
+ - BZ2:
25
+ . Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb)
26
+
24
27
- CURL:
25
28
. Bumped required libcurl version to 7.29.0. (cmb)
26
29
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
123
123
}
124
124
} else if (status != BZ_OK ) {
125
125
/* Something bad happened */
126
+ php_error_docref (NULL , E_NOTICE , "bzip2 decompression failed" );
126
127
php_stream_bucket_delref (bucket );
127
128
return PSFS_ERR_FATAL ;
128
129
}
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- Bug #71263: fread() does not detects decoding errors from filter bzip2.decompress
2
+ Bug #71263: fread() does not report bzip2.decompress errors
3
3
--SKIPIF--
4
4
<?php if (!extension_loaded ("bz2 " )) print "skip bz2 extension not loaded " ; ?>
5
5
--FILE--
6
6
<?php
7
7
8
- // Should notices be generated?
9
-
10
8
function test ($ case ) {
11
9
$ plain = "The quick brown fox jumps over the lazy dog. " ;
12
10
$ fn = "bug71263.bz2 " ;
@@ -46,10 +44,14 @@ test(1);
46
44
test (2 );
47
45
test (3 );
48
46
?>
49
- --EXPECT --
47
+ --EXPECTF --
50
48
Compressed len = 81
49
+
50
+ Notice: fread(): bzip2 decompression failed in %s on line %d
51
51
read: bool(false)
52
52
Compressed len = 81
53
53
read: string(0) ""
54
54
Compressed len = 81
55
+
56
+ Notice: fread(): bzip2 decompression failed in %s on line %d
55
57
read: bool(false)
You can’t perform that action at this time.
0 commit comments