X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FForm%2Fform.api.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FForm%2Fform.api.php;h=0189bf467ca90f90155644f8f61287ce5867171b;hp=554e2710d70f03b480acc6d14db2ea4cb4af40ab;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/lib/Drupal/Core/Form/form.api.php b/web/core/lib/Drupal/Core/Form/form.api.php index 554e2710d..0189bf467 100644 --- a/web/core/lib/Drupal/Core/Form/form.api.php +++ b/web/core/lib/Drupal/Core/Form/form.api.php @@ -121,7 +121,7 @@ function callback_batch_finished($success, $results, $operations) { '#items' => $results, ]; $message .= drupal_render($list); - drupal_set_message($message); + \Drupal::messenger()->addStatus($message); } else { // An error occurred. @@ -129,9 +129,9 @@ function callback_batch_finished($success, $results, $operations) { $error_operation = reset($operations); $message = t('An error occurred while processing %error_operation with arguments: @arguments', [ '%error_operation' => $error_operation[0], - '@arguments' => print_r($error_operation[1], TRUE) + '@arguments' => print_r($error_operation[1], TRUE), ]); - drupal_set_message($message, 'error'); + \Drupal::messenger()->addError($message); } }