]> granicus.if.org Git - php/commitdiff
return size_t
authorXinchen Hui <laruence@php.net>
Thu, 5 Feb 2015 08:26:38 +0000 (16:26 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 5 Feb 2015 08:26:38 +0000 (16:26 +0800)
main/streams/memory.c

index 51ce12a06f19eb00855995cea6d17fa7eae20836..8d568ad9c1ae7f3ea466c305bd6f5b85daf0071e 100644 (file)
@@ -377,7 +377,7 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t
                        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 NULL;
+                               return 0;
                        }
                        php_stream_write(file, membuf, memsize);
                        php_stream_free_enclosed(ts->innerstream, PHP_STREAM_FREE_CLOSE);