Doc #72900 [Ver->Csd]: stream_copy_to_stream() can also return false

From: Date: Fri, 19 Aug 2016 22:48:40 +0000
Subject: Doc #72900 [Ver->Csd]: stream_copy_to_stream() can also return false
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13840@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72900&edit=1 ID: 72900 Updated by: cmb@php.net Reported by: alexxz at alexxz dot ru Summary: stream_copy_to_stream() can also return false -Status: Verified +Status: Closed Type: Documentation Problem Package: Streams related PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2016-08-19 22:48:04] 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 16:58:18] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72900&edit=1

« previous php.doc.bugs (#13840) next »