Skip to content

Commit 1db15a4

Browse files
committed
Suppress warning when not propagating the skip row exception.
1 parent 0f79243 commit 1db15a4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/Plugin/migrate/process/SubProcess.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,21 @@ protected function doProcess($values, MigrateExecutableInterface $executable, Ro
237237
$this->parentIndex => $index,
238238
]);
239239

240-
$executable->processRow($new_row, $this->values);
240+
try {
241+
$executable->processRow($new_row, $this->values);
241242

242-
yield $new_row->get($this->outputKey) => $new_row->getDestination();
243+
yield $new_row->get($this->outputKey) => $new_row->getDestination();
244+
}
245+
catch (MigrateSkipRowException $e) {
246+
if ($this->propagateSkip) {
247+
// Propagating, so propagate.
248+
throw $e;
249+
}
250+
251+
// Not propagating the skip, so let's try to make sure that the caller
252+
// gets something along the lines of what they expect.
253+
yield $new_row->get($this->outputKey) => NULL;
254+
}
243255
}
244256
}
245257

0 commit comments

Comments
 (0)