Commit ec69f771 authored by catch's avatar catch

Issue #3103993 by Hardik_Patel_12, Rangaswini, alexpott: Value returned from...

Issue #3103993 by Hardik_Patel_12, Rangaswini, alexpott: Value returned from FileSystem methods are not checked in streamUploadData() function

(cherry picked from commit f6ee10b4)
parent 4170d692
......@@ -287,6 +287,10 @@ protected function streamUploadData() {
$file_data = fopen('php://input', 'rb');
$temp_file_path = $this->fileSystem->tempnam('temporary://', 'file');
if ($temp_file_path === FALSE) {
$this->logger->error('Temporary file could not be created for file upload.');
throw new HttpException(500, 'Temporary file could not be created');
}
$temp_file = fopen($temp_file_path, 'wb');
if ($temp_file) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment