Browse Source

update comment avatar when emails is empty

develop
Simon Vieille 6 days ago
parent
commit
026f5a4666
  1. 2
      src/Entity/Blog/Comment.php

2
src/Entity/Blog/Comment.php

@ -205,7 +205,7 @@ class Comment implements EntityInterface
*/
public function getAvatar(): string
{
return 'https://secure.gravatar.com/avatar/'.md5($this->getEmail()).'.jpg?s=90&d=retro';
return 'https://secure.gravatar.com/avatar/'.md5($this->getEmail() ?? 'undefined@undefined').'.jpg?s=90&d=retro';
}
/**

Loading…
Cancel
Save