fix conflict + error on CommentType

This commit is contained in:
nobohan
2021-06-25 13:57:49 +02:00
11 changed files with 520 additions and 41 deletions

View File

@@ -51,7 +51,7 @@ class CommentType extends AbstractType
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
$data = $event->getForm()->getData();
$comment = $event->getData();
$comment = $event->getData() ?? ['comment' => ''];
if ($data->getComment() !== $comment['comment']) {
$data->setDate(new \DateTime());