From a7e38578c702665845aa067f23f0f22cadd46c90 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 11 Aug 2019 11:57:10 +0200 Subject: [PATCH] Fix when submitting form --- src/Form/ComposeType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/ComposeType.php b/src/Form/ComposeType.php index c0a2a60..dce6bcf 100644 --- a/src/Form/ComposeType.php +++ b/src/Form/ComposeType.php @@ -39,7 +39,7 @@ class ComposeType extends AbstractType { /**@var $user \App\SocialEntity\MastodonAccount**/ $user = $options['user']; - if( $user && $user->getDefaultSensitivity()) { + if( $user->getDefaultSensitivity()) { $checkbox = [ 'required' => false, 'attr' => ['checked' => 'checked'], @@ -58,7 +58,7 @@ class ComposeType extends AbstractType { 'status.visibility.private' => 'private', 'status.visibility.direct' => 'direct', ], - 'data' => $user?$user->getDefaultVisibility():'public', + 'data' => $user->getDefaultVisibility(), ]); $builder->add('timeZone', TimezoneType::class); $builder->add('sensitive', CheckboxType::class, $checkbox);