Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / includes / batch.inc
index 402f195c2f19ded32eb2cd8a86a492b076723b55..de43364d68734f38c1940efac12502de925d8b31 100644 (file)
@@ -42,7 +42,7 @@ function _batch_page(Request $request) {
   if (!$batch) {
     $batch = \Drupal::service('batch.storage')->load($request_id);
     if (!$batch) {
-      drupal_set_message(t('No active batch.'), 'error');
+      \Drupal::messenger()->addError(t('No active batch.'));
       return new RedirectResponse(\Drupal::url('<front>', [], ['absolute' => TRUE]));
     }
   }