ID:               32945
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jxmaster at msn dot com
 Status:           Assigned
 Bug Type:         Filesystem function related
 Operating System: freebsd4.3,windowsxp,linux9.0
 PHP Version:      4.3.11
 Assigned To:      pollita
 New Comment:

The very same situation exists with http wrapper.
The problem is that php_stream_copy_to_stream() returns 0 on error and
we can't distinguish zero-length file from error if there is no stat()
for current wrapper.


Previous Comments:
------------------------------------------------------------------------

[2005-05-10 15:17:35] [EMAIL PROTECTED]

Sara, you're most familiar with this.. (this propably happens in PHP 5
too)


------------------------------------------------------------------------

[2005-05-04 17:28:47] jxmaster at msn dot com

Description:
------------
copy('ftp://username:[EMAIL PROTECTED]/path/filename', 'tmp.dat');
If the file in the ftp server has size 0, the copy statment returned
false. However, the file tmp.dat was created with size 0.
copy ('localfile', 'tmp.dat') worked well.

Reproduce code:
---------------
copy('ftp://username:[EMAIL PROTECTED]/path/filename', 'tmp.dat');

Expected result:
----------------
The file tmp.dat is created in the current directory with file zero and
gets a TRUE return.

Actual result:
--------------
The file tmp.dat is created in the current directory with file zero,
but gets a FALSE return.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32945&edit=1

Reply via email to