Skip to content

Commit

Permalink
Typehint variable in batch query to integer (#6206)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
drupal-daffie authored Jan 9, 2025
1 parent fe62841 commit 2384835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/batch.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 2384835

Please sign in to comment.