Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Form / EventSubscriber / FormAjaxSubscriber.php
index cae43980274a0c57cf1d1e9500bad79567f24fb4..6c9c1788f23310738bc35b390f97e8c2d1915333 100644 (file)
@@ -3,7 +3,7 @@
 namespace Drupal\Core\Form\EventSubscriber;
 
 use Drupal\Core\Ajax\AjaxResponse;
-use Drupal\Core\Ajax\ReplaceCommand;
+use Drupal\Core\Ajax\PrependCommand;
 use Drupal\Core\EventSubscriber\MainContentViewSubscriber;
 use Drupal\Core\Form\Exception\BrokenPostRequestException;
 use Drupal\Core\Form\FormAjaxException;
@@ -78,7 +78,7 @@ class FormAjaxSubscriber implements EventSubscriberInterface {
       $this->drupalSetMessage($this->t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', ['@size' => $this->formatSize($exception->getSize())]), 'error');
       $response = new AjaxResponse();
       $status_messages = ['#type' => 'status_messages'];
-      $response->addCommand(new ReplaceCommand(NULL, $status_messages));
+      $response->addCommand(new PrependCommand(NULL, $status_messages));
       $response->headers->set('X-Status-Code', 200);
       $event->setResponse($response);
       return;