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

 ID:                 53328
 Updated by:         t...@php.net
 Reported by:        mike at silverorange dot com
 Summary:            stream_flush error does not cause copy to return
                     false
 Status:             Open
 Type:               Bug
 Package:            Streams related
 Operating System:   Linux
 PHP Version:        5.2.14
 Block user comment: N
 Private report:     N

 New Comment:

Hey Mike,



I wanted to write a test case but I fail to reproduce this on 5.3.2 so
far.



E.g., I wrapped your code into a phpt, all I get is:



Warning: copy(): The second argument to copy() function cannot be a
directory in 

/home/till/test/bug53328.php on line 60

bool(false)



[ On a sidenote, I don't get this error message either. 'foo' is not a 

directory, but maybe this means that we have to implement more in the
example 

wrapper for it to work, or this is another bug in the streamwrapper?]



Anyway, aside from the weird error message it seems to work indeed on
5.3.2.



Here is your code wrapped in a phpt:

http://friendpaste.com/7Id22SbWNEBnwLhi9FnSTu



Execute with: pear run-tests bug53328.phpt


Previous Comments:
------------------------------------------------------------------------
[2010-11-17 06:48:23] mike at silverorange dot com

Description:
------------
In a custom stream wrapper if stream_flush() returns false as the
documentation 

says it may, parent copy operations do not return false.

Test script:
---------------
http://labs.silverorange.com/files/php-stream-wrapper/test.phps



http://labs.silverorange.com/files/php-stream-wrapper/test.txt

Expected result:
----------------
copy should return false.

Actual result:
--------------
copy returns true.


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



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

Reply via email to