If the bzip2.decompress filter fails to decompress the stream, we raise
a notice instead of failing silently.
. Fixed bug #79368 ("Unexpected end of file" is not an acceptable error
message). (Alex Dowad)
+- BZ2:
+ . Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb)
+
- CURL:
. Bumped required libcurl version to 7.29.0. (cmb)
}
} else if (status != BZ_OK) {
/* Something bad happened */
+ php_error_docref(NULL, E_NOTICE, "bzip2 decompression failed");
php_stream_bucket_delref(bucket);
return PSFS_ERR_FATAL;
}
--TEST--
-Bug #71263: fread() does not detects decoding errors from filter bzip2.decompress
+Bug #71263: fread() does not report bzip2.decompress errors
--SKIPIF--
<?php if (!extension_loaded("bz2")) print "skip bz2 extension not loaded"; ?>
--FILE--
<?php
-// Should notices be generated?
-
function test($case) {
$plain = "The quick brown fox jumps over the lazy dog.";
$fn = "bug71263.bz2";
test(2);
test(3);
?>
---EXPECT--
+--EXPECTF--
Compressed len = 81
+
+Notice: fread(): bzip2 decompression failed in %s on line %d
read: bool(false)
Compressed len = 81
read: string(0) ""
Compressed len = 81
+
+Notice: fread(): bzip2 decompression failed in %s on line %d
read: bool(false)