diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php index b862f54..82cdea9 100644 --- a/core/modules/comment/src/CommentForm.php +++ b/core/modules/comment/src/CommentForm.php @@ -286,7 +286,7 @@ public function buildEntity(array $form, FormStateInterface $form_state) { $author_id = $this->currentUser->id(); } $comment->setOwnerId($author_id); - if ($author_id > 0) { + if ($author_id !== 0) { // Update author name for authorized user. $comment->setAuthorName($comment->getAuthorName()); }