Commit 3528551b authored by alexpott's avatar alexpott

Issue #3036197 by dww: REST FileUploadResource::streamUploadData() can call fclose(FALSE)

(cherry picked from commit 04343d7d)
parent 6cb23d68
......@@ -322,8 +322,8 @@ protected function streamUploadData() {
fclose($temp_file);
}
else {
// Close the file streams.
fclose($temp_file);
// Close the input file stream since we can't proceed with the upload.
// Don't try to close $temp_file since it's FALSE at this point.
fclose($file_data);
$this->logger->error('Temporary file "%path" could not be opened for file upload', ['%path' => $temp_file_path]);
throw new HttpException(500, 'Temporary file could not be opened');
......
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