1--TEST-- 2Bug #78506: Error in a php_user_filter::filter() is not reported 3--FILE-- 4<?php 5 6class MyFilter extends php_user_filter { 7 public function filter($in, $out, &$consumed, $closing) 8 { 9 stream_bucket_make_writeable($in); 10 return PSFS_ERR_FATAL; 11 } 12 13} 14 15stream_filter_register('filtername', MyFilter::class); 16 17$source_resource = fopen('php://memory', 'rb+'); 18fwrite($source_resource, 'Test data'); 19rewind($source_resource); 20 21stream_filter_prepend($source_resource,'filtername',STREAM_FILTER_READ); 22 23var_dump(stream_copy_to_stream($source_resource, fopen('php://memory', 'wb'))); 24 25?> 26--EXPECT-- 27bool(false) 28