diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php index 75ec98e..3445ae6 100644 --- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php +++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php @@ -217,7 +217,7 @@ public function getReplyForm(Request $request, NodeInterface $node, $pid = NULL) // Load the parent comment. $comment = $this->entityManager->getStorageController('comment')->load($pid); // Check if the parent comment is published and belongs to the current nid. - if (($comment->status->value != COMMENT_PUBLISHED) || ($comment->nid->target_id != $node->id())) { + if (($comment->status->value == COMMENT_NOT_PUBLISHED) || ($comment->nid->target_id != $node->id())) { drupal_set_message($this->translation->translate('The comment you are replying to does not exist.'), 'error'); return new RedirectResponse($this->urlGenerator->generateFromPath($uri['path'], array('absolute' => TRUE))); }