diff options
author | Jakub Zelenka <bukka@php.net> | 2015-02-08 14:08:31 +0000 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2015-02-08 14:08:31 +0000 |
commit | f2825042b4dd9aa941a080c027f15f41c1b9e4bc (patch) | |
tree | 2e7d97c1dfd4aeabb506ffdd206a612b82adea8d /main/streams/memory.c | |
parent | 0a81f9a0bd36deac8707949acbcf92f612b60e8e (diff) | |
parent | ce9f52adcdfb19f70dc4274f3587e58ac07995bd (diff) | |
download | php-git-f2825042b4dd9aa941a080c027f15f41c1b9e4bc.tar.gz |
Merge branch 'master' into jsond
Conflicts:
ext/json/json.c
Diffstat (limited to 'main/streams/memory.c')
-rw-r--r-- | main/streams/memory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams/memory.c b/main/streams/memory.c index 02a44ddfc5..2016a9898c 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -375,6 +375,10 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t if (memsize + count >= ts->smax) { php_stream *file = php_stream_fopen_temporary_file(ts->tmpdir, "php", NULL); + if (file == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory."); + return 0; + } php_stream_write(file, membuf, memsize); php_stream_free_enclosed(ts->innerstream, PHP_STREAM_FREE_CLOSE); ts->innerstream = file; |