php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72900 stream_copy_to_stream() can also return false
Submitted: 2016-08-19 16:58 UTC Modified: 2016-08-19 22:48 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: alexxz at alexxz dot ru Assigned: cmb (profile)
Status: Closed Package: Streams related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexxz at alexxz dot ru
New email:
PHP Version: OS:

 

 [2016-08-19 16:58 UTC] alexxz at alexxz dot ru
Description:
------------
http://php.net/manual/en/function.stream-copy-to-stream.php
Return Values ΒΆ

Returns the total count of bytes copied.

Documentation says function returns int. But in fact it returns false on error.



Test script:
---------------
dd if=/dev/zero of=test bs=1024 count=10000
sudo losetup -f test
sudo mkfs.ext4 /dev/loop0
sudo mount /dev/loop0 /media/alexxz/
sudo chown alexxz /media/alexxz/
/usr/bin/time php -n -r 'var_dump(stream_copy_to_stream(fopen("/dev/zero", "r"), fopen("/media/alexxz/s", "w")));'
bool(false)
df -h




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-19 17:09 UTC] requinix@php.net
-Package: Documentation problem +Package: Streams related
 [2016-08-19 22:35 UTC] cmb@php.net
-Summary: stream_copy_to_stream function documentaion is incomplete on return value +Summary: stream_copy_to_stream() can also return false -Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2016-08-19 22:48 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=339912
Log: Fix #72900: stream_copy_to_stream() can also return false
 [2016-08-19 22:48 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2016-08-19 22:48 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=604ce6e4e62c8ed349f98a305d90a38b717cc081
Log: Fix #72900: stream_copy_to_stream() can also return false
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 06:01:29 2024 UTC