Skip to content
Snippets Groups Projects
Commit c16c1c71 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2328629 by Berdir: Fixed Comment::hasParentComment() tries to load comment with ID 0.

parent 7a615492
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -324,8 +324,7 @@ public static function bundleFieldDefinitions(EntityTypeInterface $entity_type,
* {@inheritdoc}
*/
public function hasParentComment() {
$parent = $this->get('pid')->entity;
return !empty($parent);
return (bool) $this->get('pid')->target_id;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment