Commit b7f85d84 authored by benjifisher's avatar benjifisher Committed by Lucas Hedding
Browse files

244: Handle empty array properly

parent cd45ee43
...@@ -36,7 +36,7 @@ class Transpose extends ProcessPluginBase { ...@@ -36,7 +36,7 @@ class Transpose extends ProcessPluginBase {
*/ */
public function transform($table, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { public function transform($table, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
// Make sure that $table is an array of arrays. // Make sure that $table is an array of arrays.
if (!is_array($table)) { If (!is_array($table) || $table == []) {
return []; return [];
} }
foreach ($table as &$value) { foreach ($table as &$value) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment