History log of /PHP-8.0/ext/standard/tests/file/stream_copy_to_stream_empty.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# b95b5534 25-Mar-2021 Nikita Popov

Remove zero size special case for copy_to_stream

This doesn't seem to serve a purpose anymore. Stats are expensive,
so doing an unnecessary stat just to short-circuit the zero size
c

Remove zero size special case for copy_to_stream

This doesn't seem to serve a purpose anymore. Stats are expensive,
so doing an unnecessary stat just to short-circuit the zero size
case is rather dubious. It can also break with stream wrappers
that return inaccurate sizes (symfony/symfony#40574) and probably
can also break with stream filters.

Drop the special case and adjust code to make it more obvious that
it will still be handled correctly.

Closes GH-6807.

show more ...