diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index 2c61c8d..9353a76 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -887,8 +887,6 @@ public function validateForm($form_id, &$form, &$form_state) { protected function finalizeValidation($form_id, &$form, &$form_state) { // After validation, loop through and assign each element its errors. $this->setElementErrorsFromFormState($form, $form_state); - // Store all of the errors for this form at the top level. - $form['#errors'] = $this->getErrors($form_state); // Mark this form as validated. $this->validatedForms[$form_id] = TRUE; } diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 6c32bce..2fd57f5 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -927,7 +927,7 @@ function file_save_upload($form_field_name, $validators = array(), $destination else { $message .= ' ' . array_pop($errors); } - drupal_set_message($message); + drupal_set_message($message, 'error'); $files[$i] = FALSE; continue; } @@ -937,7 +937,7 @@ function file_save_upload($form_field_name, $validators = array(), $destination // operations. $file->uri = $file->destination; if (!drupal_move_uploaded_file($file_info->getRealPath(), $file->getFileUri())) { - drupal_set_message(t('File upload error. Could not move uploaded file.')); + drupal_set_message(t('File upload error. Could not move uploaded file.'), 'error'); watchdog('file', 'Upload error. Could not move uploaded file %file to destination %destination.', array('%file' => $file->filename, '%destination' => $file->uri)); $files[$i] = FALSE; continue;