diff --git a/core/modules/comment/src/CommentFieldItemList.php b/core/modules/comment/src/CommentFieldItemList.php index 5c0297b..cac425d 100644 --- a/core/modules/comment/src/CommentFieldItemList.php +++ b/core/modules/comment/src/CommentFieldItemList.php @@ -30,4 +30,16 @@ public function get($index) { return parent::get($index); } + /** + * {@inheritdoc} + */ + public function offsetExists($offset) { + // For consistency with what happens in get(), we force offsetExists() to + // be TRUE for delta 0. + if ($offset === 0) { + return TRUE; + } + return parent::offsetExists($offset); + } + }