Problem/Motivation

The $process property on the Migration entity should always be an array otherwise it can lead to fatal errors when calling getProcess because getProcessNormalized() is rightly type-hinted as an array. This happens in the UI when creating new migrations.

Proposed resolution

Initialize it to an array.

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

CommentFileSizeAuthor
init-process.patch464 bytesbenjy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

benjy created an issue. See original summary.

chx’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quickfix

It's already typehinted and used as an array. This couldn't be more trivial.

xjm’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Needs followup

Since reproducing this depends on the UI, there's not really a clear case to add test coverage in core. Hopefully test coverage is added to that module. :) Tagging for a followup for that.

Committed to 8.1.x and cherry-picked to 8.0.x. Thanks!

  • xjm committed 95e331d on 8.1.x
    Issue #2629374 by benjy: $process should be initialised to empty array
    

  • xjm committed 8fb56c5 on
    Issue #2629374 by benjy: $process should be initialised to empty array...
benjy’s picture

Issue tags: -Needs followup

It was the Migrate UI tests that actually caught this issue so we have coverage there :)

Status: Fixed » Closed (fixed)

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