diff options
-rw-r--r-- | includes/file.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/file.inc b/includes/file.inc index 717eb8b97..24248ad84 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -869,12 +869,12 @@ function file_save_upload($source, $validators = array(), $destination = FALSE, switch ($_FILES['files']['error'][$source]) { case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_FORM_SIZE: - drupal_set_message(t('The file %file could not be saved, because it exceeds %maxsize, the maximum allowed size for uploads.', array('%file' => $source, '%maxsize' => format_size(file_upload_max_size()))), 'error'); + drupal_set_message(t('The file %file could not be saved, because it exceeds %maxsize, the maximum allowed size for uploads.', array('%file' => $_FILES['files']['name'][$source], '%maxsize' => format_size(file_upload_max_size()))), 'error'); return FALSE; case UPLOAD_ERR_PARTIAL: case UPLOAD_ERR_NO_FILE: - drupal_set_message(t('The file %file could not be saved, because the upload did not complete.', array('%file' => $source)), 'error'); + drupal_set_message(t('The file %file could not be saved, because the upload did not complete.', array('%file' => $_FILES['files']['name'][$source])), 'error'); return FALSE; case UPLOAD_ERR_OK: @@ -886,7 +886,7 @@ function file_save_upload($source, $validators = array(), $destination = FALSE, // Unknown error default: - drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.', array('%file' => $source)), 'error'); + drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.', array('%file' => $_FILES['files']['name'][$source])), 'error'); return FALSE; } |