mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
wb -> r+b
This commit is contained in:
@@ -221,7 +221,7 @@ PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC)
|
||||
self->smax = -1;
|
||||
self->mode = mode;
|
||||
|
||||
stream = php_stream_alloc(&php_stream_memory_ops, self, 0, "rwb");
|
||||
stream = php_stream_alloc(&php_stream_memory_ops, self, 0, "r+b");
|
||||
stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
|
||||
return stream;
|
||||
}
|
||||
@@ -434,7 +434,7 @@ PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STR
|
||||
assert(self != NULL);
|
||||
self->smax = max_memory_usage;
|
||||
self->mode = mode;
|
||||
stream = php_stream_alloc(&php_stream_temp_ops, self, 0, "rwb");
|
||||
stream = php_stream_alloc(&php_stream_temp_ops, self, 0, "r+b");
|
||||
stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
|
||||
self->innerstream = php_stream_memory_create(mode);
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char
|
||||
if (fd==-1) {
|
||||
fp = NULL;
|
||||
} else {
|
||||
fp = fdopen(fd, "wb");
|
||||
fp = fdopen(fd, "r+b");
|
||||
}
|
||||
#else
|
||||
if (mktemp(opened_path)) {
|
||||
|
||||
@@ -1236,7 +1236,7 @@ PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char
|
||||
FILE *fp = php_open_temporary_file(dir, pfx, opened_path TSRMLS_CC);
|
||||
|
||||
if (fp) {
|
||||
php_stream *stream = php_stream_fopen_from_file_rel(fp, "wb");
|
||||
php_stream *stream = php_stream_fopen_from_file_rel(fp, "r+b");
|
||||
if (stream) {
|
||||
return stream;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user