I ran into this issue while running some batch jobs from drush. At this point a fix has gone in to drush to actually keep executing jobs while running into the problem (https://github.com/drush-ops/drush/issues/1930), but as the issue points out, the issue was actually found in the 8.x version of this module (or so to speak), and removed from those core files (see #2664290: Remove array typehints from batch callbacks). So I guess that fix has not been "backported" into the contrib module. Anyway. Here is a patch removing a couple of type hints.

And for reference (this is what one would google for). This would produce this sort of error message:

Argument 1 passed to l10n_update_batch_import_save() must be of the type array, object given l10n_update.bulk.inc:513

CommentFileSizeAuthor
#2 remove_array_typehints-2764133-2.patch593 byteseiriksm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eiriksm created an issue. See original summary.

eiriksm’s picture

Status: Active » Needs review
FileSize
593 bytes

Hm, also. Were it not for the fact that I was running this from drush, where the parameter is an object, so passed by reference by default, would not a "regular job", which would pass "only an array" in here, need to have it as a reference?

Doing that in the patch, anyway.

  • Sutharsan committed 1a285d2 on 7.x-2.x authored by eiriksm
    Issue #2764133 by eiriksm: Remove array typehints from batch callbacks
    
Sutharsan’s picture

Status: Needs review » Fixed

No need to pass $context by reference here.
Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.