mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
commentembeddable: add a condition for the early return in normalisation
This commit is contained in:
parent
1a783e1881
commit
5e0a693108
@ -39,7 +39,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa
|
||||
*/
|
||||
public function normalize($object, ?string $format = null, array $context = []): array
|
||||
{
|
||||
if (null === $object) {
|
||||
if (null === $object or (null === $object->getComment() and null === $object->getUserId() and null === $object->getDate())) {
|
||||
return [
|
||||
'comment' => '',
|
||||
'isNull' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user