summaryrefslogtreecommitdiff
path: root/main/php_open_temporary_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_open_temporary_file.c')
-rw-r--r--main/php_open_temporary_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index ed4af333ee..95b47b3456 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -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)) {