diff --git a/core/modules/comment/src/Entity/Comment.php b/core/modules/comment/src/Entity/Comment.php index f14b877..f8a7828 100644 --- a/core/modules/comment/src/Entity/Comment.php +++ b/core/modules/comment/src/Entity/Comment.php @@ -325,8 +325,7 @@ public static function bundleFieldDefinitions(EntityTypeInterface $entity_type, */ public function hasParentComment() { // Do not load parent comment entity. - $parent = $this->get('pid')->target_id; - return !empty($parent); + return (bool) $this->get('pid')->target_id; } /**