Skip to content

Commit

Permalink
BUGFIX: get first subscription the right way
Browse files Browse the repository at this point in the history
It ain't no JS man!
  • Loading branch information
dimaip committed Jan 26, 2017
1 parent 2f7f8b8 commit aead382
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Classes/Psmb/Newsletter/Controller/NewsletterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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']);
Expand Down

0 comments on commit aead382

Please sign in to comment.