You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In includes/file.inc line 517 the following code takes care of handling the errors if something has occurred during file upload.
if (isset($_FILES['files']) && $_FILES['files']['name'][$source] && is_uploaded_file($_FILES['files']['tmp_name'][$source])) {
The issue is that if the PHP upload limit is reached the is_uploaded_file() function will return false and the error will never be returned correct to the user. The user gets an error, but just an message that the image could not be uploaded - not the "file is too large"-error. The is_uploaded_file() function should not be in this if-statement.
Perhaps $_FILES['files']['error'][$source] should be checked first as testing show that it gives a proper 1 as a result.
There are multiple patches for this, but it has never gotten into the master branch for drupalistic reasons. https://www.drupal.org/node/30520
The text was updated successfully, but these errors were encountered:
In includes/file.inc line 517 the following code takes care of handling the errors if something has occurred during file upload.
if (isset($_FILES['files']) && $_FILES['files']['name'][$source] && is_uploaded_file($_FILES['files']['tmp_name'][$source])) {
The issue is that if the PHP upload limit is reached the is_uploaded_file() function will return false and the error will never be returned correct to the user. The user gets an error, but just an message that the image could not be uploaded - not the "file is too large"-error. The is_uploaded_file() function should not be in this if-statement.
Perhaps $_FILES['files']['error'][$source] should be checked first as testing show that it gives a proper 1 as a result.
There are multiple patches for this, but it has never gotten into the master branch for drupalistic reasons. https://www.drupal.org/node/30520
The text was updated successfully, but these errors were encountered: