We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b6e897 commit 04343d7Copy full SHA for 04343d7
core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
@@ -325,8 +325,8 @@ protected function streamUploadData() {
325
fclose($temp_file);
326
}
327
else {
328
- // Close the file streams.
329
- 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.
330
fclose($file_data);
331
$this->logger->error('Temporary file "%path" could not be opened for file upload', ['%path' => $temp_file_path]);
332
throw new HttpException(500, 'Temporary file could not be opened');
0 commit comments