Skip to content

Commit

Permalink
Merge pull request #377 from w-vision/dkarlovi-patch-2
Browse files Browse the repository at this point in the history
fix: don't double-count the import file
  • Loading branch information
dpfaffenbauer authored Nov 14, 2022
2 parents e3a0f11 + 8cf783b commit c6ea991
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataDefinitionsBundle/Importer/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public function doImport(ImportDefinitionInterface $definition, $params): array
}


if ((\is_countable($data) || $data instanceof Countable) && \count($data) > 0) {
$this->eventDispatcher->dispatch($definition, 'data_definitions.import.total', \count($data), $params);
if ((\is_countable($data) || $data instanceof Countable) && ($count = \count($data)) > 0) {
$this->eventDispatcher->dispatch($definition, 'data_definitions.import.total', $count, $params);
}

if ($runner instanceof ImportStartFinishRunnerInterface) {
Expand Down

0 comments on commit c6ea991

Please sign in to comment.