Commit b95b553
committed
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 phpGH-6807.1 parent dd227f6 commit b95b553
File tree
2 files changed
+21
-21
lines changed- ext/standard/tests/file
- main/streams
2 files changed
+21
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1539 | 1539 | | |
1540 | 1540 | | |
1541 | 1541 | | |
1542 | | - | |
1543 | 1542 | | |
1544 | 1543 | | |
1545 | 1544 | | |
| |||
1554 | 1553 | | |
1555 | 1554 | | |
1556 | 1555 | | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | | - | |
1562 | | - | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | 1556 | | |
1569 | 1557 | | |
1570 | 1558 | | |
| |||
1641 | 1629 | | |
1642 | 1630 | | |
1643 | 1631 | | |
1644 | | - | |
| 1632 | + | |
1645 | 1633 | | |
1646 | 1634 | | |
1647 | 1635 | | |
1648 | 1636 | | |
1649 | 1637 | | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
| 1638 | + | |
1658 | 1639 | | |
1659 | 1640 | | |
1660 | 1641 | | |
| |||
0 commit comments