Custom Streams, fclose & stream_close

php.internals

Jared Williams

20 years ago
Hi, Is the PHP manual correct in that fclose() returns a bool, but a custom wrapper stream_close() is void? Would like to signal a problem if I have a problem closing a custom stream. Jared

Wez Furlong

20 years ago
stream_close can return any value it likes... however, it is ignored and php_userstreamop_close always returns success to the streams layer. This is a bug, but should be simple to fix. (volunteers welcome; I don't have a current cvs checkout). --Wez. On 2/13/06, Jared Williams <jared.williams@ntlworld.com> wrote:

Jared Williams

20 years ago
Hi,
> stream_close can return any value it likes... however, it is > ignored and php_userstreamop_close always returns success to > the streams layer. > This is a bug, but should be simple to fix. (volunteers > welcome; I don't have a current cvs checkout). > > --Wez.
This should fix it, I think. :)
> > > > > > Hi, > > Is the PHP manual correct in that fclose() returns > a bool, but > > a custom wrapper stream_close() is void? Would like to > signal a problem if I have a problem closing a custom stream. > >
Jared

Derick Rethans

20 years ago
On Wed, 15 Feb 2006, Jared Williams wrote:
> > stream_close can return any value it likes... however, it is > > ignored and php_userstreamop_close always returns success to > > the streams layer. > > This is a bug, but should be simple to fix. (volunteers > > welcome; I don't have a current cvs checkout). > > This should fix it, I think. :)
Please put it online and provide a link. We blcok all attachments which are not text/plain. regards, Derick

Jared Williams

20 years ago
> > > stream_close can return any value it likes... however, it > is ignored > > > and php_userstreamop_close always returns success to the streams > > > layer. > > > This is a bug, but should be simple to fix. (volunteers > welcome; I > > > don't have a current cvs checkout). > > > > This should fix it, I think. :) > > Please put it online and provide a link. We blcok all > attachments which are not text/plain.
http://ren.dotgeek.org/phppatches/userspace_stream_close_return.diff Jared

Wez Furlong

20 years ago
Looks good. On 2/15/06, Jared Williams <jared.williams1@ntlworld.com> wrote: