Problem/Motivation
\Drupal\migrate\Entity\Migration::getProcessPlugins() will return NULL if an empty array is passed.
I hit this with the d6_user_picture_file migration, which does not specify a process plugin for the fid field. The resulting error is
Invalid argument supplied for foreach() MigrateExecutable.php:359
I don't know why this does not show up in the test suite.
Proposed resolution
Initialize $this->processPlugins[$index] to an empty array.
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2335345-3-migrate-process-plugins-array.patch | 1.54 KB | tstoeckler |
| #1 | 2335345-1-tests-only.patch | 910 bytes | tstoeckler |
Comments
Comment #1
tstoecklerHere we go.
Comment #3
dawehnerDidn't we switched to use no ()?
let's just use the short array syntax everywhere.
Comment #4
tstoecklerThanks!
Re 1. We should still wait for some more feedback on #2328919: Remove () from a bunch of @covers definitions in PHPUnit IMO, and as stated there, I find the () to be more consistent with @see. I won't lose sleep over this, though, if you insist.
Fixed 2. (It's gonna be a while until [] becomes second nature...)
Comment #5
benjy commentedNot sure we should hold this functional issue + a test up while we decide on some doc standards. That issue can update this file if they change the standards.
Comment #6
alexpottCommitted 2ef89a6 and pushed to 8.0.x. Thanks!