diff --git a/core/modules/edit/lib/Drupal/edit/EditController.php b/core/modules/edit/lib/Drupal/edit/EditController.php
index da224bb..831e2ff 100644
--- a/core/modules/edit/lib/Drupal/edit/EditController.php
+++ b/core/modules/edit/lib/Drupal/edit/EditController.php
@@ -121,7 +121,10 @@ public function fieldForm(EntityInterface $entity, $field_name, $langcode, $view
 
       $errors = form_get_errors();
       if (count($errors)) {
-        $response->addCommand(new FieldFormValidationErrorsCommand(theme('status_messages')));
+        $status_messages = array(
+          '#theme' => 'status_messages'
+        );
+        $response->addCommand(new FieldFormValidationErrorsCommand(drupal_render($status_messages)));
       }
     }
 
