Skip to content
Snippets Groups Projects
Commit f6ee10b4 authored by catch's avatar catch
Browse files

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
parent ffbc5de7
No related branches found
No related tags found
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment