There is a bug in stream_filter_remove() that calls the stream destructor when it shouldn't. I have included two attachments--one is the patch to streamsfuncs.c and the other is a test.
Take a look :) Ilia
Index: streamsfuncs.c =================================================================== RCS file: /repository/php-src/ext/standard/streamsfuncs.c,v retrieving revision 1.58.2.6.2.15.2.21 diff -u -b -r1.58.2.6.2.15.2.21 streamsfuncs.c --- streamsfuncs.c 8 Sep 2008 01:33:08 -0000 1.58.2.6.2.15.2.21 +++ streamsfuncs.c 28 Sep 2008 22:29:31 -0000 @@ -1202,7 +1202,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not invalidate filter, not removing"); RETURN_FALSE; } else { - php_stream_filter_remove(filter, 1 TSRMLS_CC); + php_stream_filter_remove(filter, 0 TSRMLS_CC); RETURN_TRUE; } }
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php