Issue #3036197 by dww: REST FileUploadResource::streamUploadData() can call fclose(FALSE)
parent
0b6e897b34
commit
04343d7d91
|
|
@ -325,8 +325,8 @@ class FileUploadResource extends ResourceBase {
|
||||||
fclose($temp_file);
|
fclose($temp_file);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Close the file streams.
|
// Close the input file stream since we can't proceed with the upload.
|
||||||
fclose($temp_file);
|
// Don't try to close $temp_file since it's FALSE at this point.
|
||||||
fclose($file_data);
|
fclose($file_data);
|
||||||
$this->logger->error('Temporary file "%path" could not be opened for file upload', ['%path' => $temp_file_path]);
|
$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');
|
throw new HttpException(500, 'Temporary file could not be opened');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue