Wrong type for $project argument in locale.batch.inc functions

Created on 24 March 2025, about 2 months ago

Problem/Motivation

The docblocks for locale_translation_batch_fetch_download() and locale_translation_batch_fetch_import() say the $project argument is an object but it seems this argument is a string.

Steps to reproduce

Call locale_translation_batch_fetch_download() with an object:

locale_translation_batch_fetch_download(new stdClass(), 'en', $context);

It fails with this error:

   TypeError  Cannot access offset of type stdClass on array.

Proposed resolution

Document the correct type in the docblock.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

locale.module

Created by

🇫🇷France prudloff Lille

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024