diff options
author | Wez Furlong <wez@php.net> | 2003-02-24 21:40:23 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2003-02-24 21:40:23 +0000 |
commit | 088e2692c3d1e680fd3d9306c4adb417e761acff (patch) | |
tree | 35d276f141492b5a78779d8d95c58f7fce174dde /main/streams/cast.c | |
parent | 4474f9225a599d3f4cd3674e777d40a531d3c63b (diff) | |
download | php-git-088e2692c3d1e680fd3d9306c4adb417e761acff.tar.gz |
MFB: Bunch of streams related fixes.
Diffstat (limited to 'main/streams/cast.c')
-rw-r--r-- | main/streams/cast.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/streams/cast.c b/main/streams/cast.c index 66acd141a3..aa6e6d12b2 100644 --- a/main/streams/cast.c +++ b/main/streams/cast.c @@ -208,7 +208,12 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show return FAILURE; #endif - if (flags & PHP_STREAM_CAST_TRY_HARD) { + if (!php_stream_is_filtered(stream) && stream->ops->cast && stream->ops->cast(stream, castas, NULL TSRMLS_CC) == SUCCESS) { + if (FAILURE == stream->ops->cast(stream, castas, ret TSRMLS_CC)) { + return FAILURE; + } + goto exit_success; + } else if (flags & PHP_STREAM_CAST_TRY_HARD) { php_stream *newstream; newstream = php_stream_fopen_tmpfile(); |