Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / src / Controller / BatchController.php
index 7975dcc43869205bd7c8209e5299cd9dab2570c3..2e01c5bae1232f8db5a79e543416f6e914fdfd8a 100644 (file)
@@ -61,11 +61,22 @@ class BatchController implements ContainerInjectionInterface {
       return $output;
     }
     elseif (isset($output)) {
+      $title = isset($output['#title']) ? $output['#title'] : NULL;
       $page = [
         '#type' => 'page',
+        '#title' => $title,
         '#show_messages' => FALSE,
         'content' => $output,
       ];
+
+      // Also inject title as a page header (if available).
+      if ($title) {
+        $page['header'] = [
+          '#type' => 'page_title',
+          '#title' => $title,
+        ];
+      }
+
       return $page;
     }
   }