From 23848352c319da39cab2e1e7cf9591071238c508 Mon Sep 17 00:00:00 2001 From: drupal-daffie Date: Thu, 9 Jan 2025 20:59:40 +0100 Subject: [PATCH] Typehint variable in batch query to integer (#6206) Updated the query on the batch table to typehint the variable $id to an integer value. This is necessary for working with MongoDB. For MongoDB a condition variable needs to the right type. --- includes/batch.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/batch.inc b/includes/batch.inc index fafde864de..a34543aa46 100644 --- a/includes/batch.inc +++ b/includes/batch.inc @@ -183,7 +183,7 @@ function _drush_batch_command($id) { $data = Database::getConnection()->select('batch', 'b') ->fields('b', ['batch']) - ->condition('bid', $id) + ->condition('bid', (int) $id) ->execute() ->fetchField();