diff --git a/core/modules/system/src/Controller/BatchController.php b/core/modules/system/src/Controller/BatchController.php index 1c2f379..9a0e8f0 100644 --- a/core/modules/system/src/Controller/BatchController.php +++ b/core/modules/system/src/Controller/BatchController.php @@ -83,7 +83,7 @@ public function batchPage(Request $request) { */ public function batchPageTitle() { $current_set = _batch_current_set(); - return $current_set['title']; + return !empty($current_set['title']) ? $current_set['title'] : ''; } } diff --git a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php index 6e1d540..19ea6e9 100644 --- a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php +++ b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php @@ -121,12 +121,12 @@ public function testThemeBatch() { */ public function testTitleBatch() { batch_test_stack(NULL, TRUE); - $batch = array( + $batch = [ 'title' => 'Batch Test', - 'operations' => array( - array('_batch_test_title_callback', array()), - ), - ); + 'operations' => [ + ['_batch_test_title_callback', []], + ], + ]; batch_set($batch); return batch_process('batch-test/redirect'); }