summaryrefslogtreecommitdiff
path: root/main/streams/cast.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-02-24 21:40:23 +0000
committerWez Furlong <wez@php.net>2003-02-24 21:40:23 +0000
commit088e2692c3d1e680fd3d9306c4adb417e761acff (patch)
tree35d276f141492b5a78779d8d95c58f7fce174dde /main/streams/cast.c
parent4474f9225a599d3f4cd3674e777d40a531d3c63b (diff)
downloadphp-git-088e2692c3d1e680fd3d9306c4adb417e761acff.tar.gz
MFB: Bunch of streams related fixes.
Diffstat (limited to 'main/streams/cast.c')
-rw-r--r--main/streams/cast.c7
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();