From d913d9fb0bdbdbc794c543cc3a756ac26b1a9c02 Mon Sep 17 00:00:00 2001 From: Danny van Wijk Date: Thu, 6 Jun 2024 09:43:49 +0200 Subject: [PATCH] Fix exporting form submission --- .../AdminList/FormSubmissionExportListConfigurator.php | 3 +-- .../AdminList/FormSubmissionExportListConfiguratorTest.php | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Kunstmaan/FormBundle/AdminList/FormSubmissionExportListConfigurator.php b/src/Kunstmaan/FormBundle/AdminList/FormSubmissionExportListConfigurator.php index b7608dd7d5..810abdbb9d 100644 --- a/src/Kunstmaan/FormBundle/AdminList/FormSubmissionExportListConfigurator.php +++ b/src/Kunstmaan/FormBundle/AdminList/FormSubmissionExportListConfigurator.php @@ -125,9 +125,8 @@ public function buildIterator() $collection = new ArrayCollection(); $i = 0; - foreach ($iterableResult as $row) { + foreach ($iterableResult as $submission) { /* @var FormSubmission $submission */ - $submission = $row[0]; // Write row data $data = [ diff --git a/src/Kunstmaan/FormBundle/Tests/AdminList/FormSubmissionExportListConfiguratorTest.php b/src/Kunstmaan/FormBundle/Tests/AdminList/FormSubmissionExportListConfiguratorTest.php index 8f8dc9ae2e..676a9a9479 100644 --- a/src/Kunstmaan/FormBundle/Tests/AdminList/FormSubmissionExportListConfiguratorTest.php +++ b/src/Kunstmaan/FormBundle/Tests/AdminList/FormSubmissionExportListConfiguratorTest.php @@ -56,9 +56,9 @@ protected function getMockedEntityManager(): \Doctrine\ORM\EntityManager ])); $submissions = [ - [$sub], - [new FormSubmission()], - [new FormSubmission()], + $sub, + new FormSubmission(), + new FormSubmission(), ]; $query = $this->getMockBuilder('Doctrine\ORM\AbstractQuery') ->disableOriginalConstructor()