Skip to content

Commit 9565a9d

Browse files
committed
Fixed error with mass creation, when elements on different level had the same name
Fixes issue #1104
1 parent b457298 commit 9565a9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Controller/AdminPages/BaseAdminController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ protected function _new(Request $request, EntityManagerInterface $em, EntityImpo
380380
}
381381
$em->flush();
382382

383-
if (count($created_count) > 0) {
383+
if (count($results) > 0) {
384384
$this->addFlash('success', t('entity.mass_creation_flash', ['%COUNT%' => $created_count]));
385385
}
386386

src/Services/ImportExportSystem/EntityImporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function massCreation(string $lines, string $class_name, ?AbstractStructu
167167
}
168168

169169
//Only return objects once
170-
return array_values(array_unique($valid_entities));
170+
return array_values(array_unique($valid_entities, SORT_REGULAR));
171171
}
172172

173173
/**

0 commit comments

Comments
 (0)