fix: type mismatches and handle nullable values
This commit is contained in:
1 parent
c33c1b6bf0
commit
e7f3233dbc
9 files changed
+67
-47
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controller\Admin\Teamer;
|
||||
|
||||
use App\Controller\Traits\AuthenticatedUserTrait;
|
||||
use App\Controller\Traits\ReturnUrlTrait;
|
||||
use App\Email\MailBodyRenderer;
|
||||
use App\Form\TeamerMailingType;
|
||||
@@ -21,6 +22,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class MailingController extends AbstractController
|
||||
{
|
||||
use AuthenticatedUserTrait;
|
||||
use ReturnUrlTrait;
|
||||
|
||||
public function __construct(
|
||||
@@ -47,7 +49,7 @@ class MailingController extends AbstractController
|
||||
}
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$this->mailingService->sendPreview($form->getData(), $this->getUser());
|
||||
$this->mailingService->sendPreview($form->getData(), $this->getAuthenticatedUser());
|
||||
|
||||
$this->addFlash('success', sprintf(
|
||||
'Die Vorschau wurde an %s gesendet',
|
||||
@@ -164,7 +166,7 @@ class MailingController extends AbstractController
|
||||
*/
|
||||
private function renderPreview(TeamerMailingDto $mailingDto): array
|
||||
{
|
||||
$values = $this->mailingService->placeholderValuesForUser($this->getUser());
|
||||
$values = $this->mailingService->placeholderValuesForUser($this->getAuthenticatedUser());
|
||||
|
||||
return [
|
||||
'subject' => $this->mailingService->render($mailingDto->getSubject(), $values),
|
||||
|
||||
Reference in new issue
Block a user