1--TEST-- 2Bug #74267 (segfault with streams and invalid data) 3--FILE-- 4<?php 5$stream = fopen('php://memory', 'w'); 6stream_filter_append($stream, 'convert.quoted-printable-decode', STREAM_FILTER_WRITE, ['line-break-chars' => "\r\n"]); 7 8$lines = [ 9 "\r\n", 10 " -=()\r\n", 11 " -=\r\n", 12 "\r\n" 13 ]; 14 15foreach ($lines as $line) { 16 fwrite($stream, $line); 17} 18 19fclose($stream); 20echo "done\n"; 21?> 22--EXPECTF-- 23Warning: fwrite(): Stream filter (convert.quoted-printable-decode): invalid byte sequence in %s on line %d 24 25Warning: fwrite(): Stream filter (convert.quoted-printable-decode): invalid byte sequence in %s on line %d 26done 27