From e20de25cbed479cec32b99bb015797b690c0b242 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Sun, 15 Apr 2012 13:36:07 -0500 Subject: [PATCH] Handle a response object returned from Batch API in the installer. --- core/includes/install.core.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 799845ed6be..9bbfd41e2e9 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -4,6 +4,7 @@ use Drupal\Core\Database\Database; use Drupal\Core\Database\Install\TaskException; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; /** * @file @@ -498,10 +499,13 @@ function install_run_task($task, &$install_state) { elseif ($current_batch == $function) { include_once DRUPAL_ROOT . '/core/includes/batch.inc'; $output = _batch_page(); + if ($output instanceof Response) { + $output->send(); + } // The task is complete when we try to access the batch page and receive // FALSE in return, since this means we are at a URL where we are no // longer requesting a batch ID. - if ($output === FALSE) { + elseif ($output === FALSE) { // Return nothing so the next task will run in the same request. variable_del('install_current_batch'); return;