From aead382940212fc014b8ddc9ea214d6bf1dee949 Mon Sep 17 00:00:00 2001 From: Dmitri Pisarev Date: Thu, 26 Jan 2017 18:23:20 +0300 Subject: [PATCH] BUGFIX: get first subscription the right way It ain't no JS man! --- Classes/Psmb/Newsletter/Controller/NewsletterController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Classes/Psmb/Newsletter/Controller/NewsletterController.php b/Classes/Psmb/Newsletter/Controller/NewsletterController.php index 6fb566b..91e54fa 100644 --- a/Classes/Psmb/Newsletter/Controller/NewsletterController.php +++ b/Classes/Psmb/Newsletter/Controller/NewsletterController.php @@ -9,7 +9,6 @@ use TYPO3\Flow\I18n\Translator; use TYPO3\Flow\Mvc\Controller\ActionController; use TYPO3\Flow\Annotations as Flow; -use function TYPO3\Flow\var_dump; use TYPO3\TYPO3CR\Domain\Model\NodeInterface; class NewsletterController extends ActionController @@ -105,7 +104,7 @@ public function testSendAction($subscription, NodeInterface $node, $email) $subscriber->setEmail($email); $subscriber->setName('Test User'); - $letter = $this->fusionMailService->generateSubscriptionLetter($subscriber, $subscriptions[0], $node); + $letter = $this->fusionMailService->generateSubscriptionLetter($subscriber, reset($subscriptions), $node); $this->fusionMailService->sendLetter($letter); $this->view->assign('value', ['status' => 'success']);