Fix default value of author in \Drupal\comment\CommentStatistics::create()

Created on 8 February 2015, almost 10 years ago
Updated 29 January 2023, almost 2 years ago


Problem/Motivation

Found this bug while review #2318875-20: Redo CommentStatisticsInterface β†’
This broken at least from #2101183: Move {comment_entity_statistics} to proper service β†’

Proposed resolution

Fix and cover with tests

Remaining tasks

Write tests, probably unittest because:
1) entity without owner interface - will always get 0 as author now (bug)
2) needs test if owner on entity is not set
both cases could mock the current user service with [0-1-2] permutations

User interface changes

no

API changes

no

Evaluation

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
CommentΒ  β†’

Last updated about 18 hours ago

Created by

πŸ‡«πŸ‡·France andypost

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024