mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
person: add the possibility of form data is null on CommentType
This commit is contained in:
parent
046f65f5ff
commit
84ab4f8d1f
@ -54,7 +54,7 @@ class CommentType extends AbstractType
|
||||
$data = $event->getForm()->getData();
|
||||
$comment = $event->getData() ?? ['comment' => ''];
|
||||
|
||||
if ($data->getComment() !== $comment['comment']) {
|
||||
if (null !== $data && $data->getComment() !== $comment['comment']) {
|
||||
$data->setDate(new \DateTime());
|
||||
$data->setUserId($this->user->getId());
|
||||
$event->getForm()->setData($data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user