diff --git a/core/includes/batch.inc b/core/includes/batch.inc index 1eff19d..afe2d6e 100644 --- a/core/includes/batch.inc +++ b/core/includes/batch.inc @@ -32,7 +32,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; function batch_load($id) { $result = db_query('SELECT batch, token FROM {batch} WHERE bid = :bid', array( ':bid' => $id, - ))->fetchField(); + ))->fetch(); if ($result) { $batch = unserialize($result->batch); $batch['token'] = $result->token; @@ -85,9 +85,8 @@ function _batch_page() { break; case 'do': - // JavaScript-based progress page callback. - $output = _batch_do(); - break; + // Return a JSON response for JavaScript-based progress page callback. + return _batch_do(); case 'do_nojs': // Non-JavaScript-based progress page.