diff --git a/app/src/Command/TransmogrifyCommand.php b/app/src/Command/TransmogrifyCommand.php index eb70e4ead..d884b6288 100644 --- a/app/src/Command/TransmogrifyCommand.php +++ b/app/src/Command/TransmogrifyCommand.php @@ -414,8 +414,10 @@ protected function cacheResults(string $table, array $row) { $this->cache[$table][$label][$key] = $row['id']; } else { - // Map id to the requested field - $this->cache[$table]['id'][ $row['id'] ][$field] = $row[$field]; + // If the row has the field then map id to the requested field. + if(array_key_exists($field, $row)) { + $this->cache[$table]['id'][ $row['id'] ][$field] = $row[$field]; + } } } }