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

Created on 8 February 2015, over 9 years ago
Updated 29 January 2023, over 1 year 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 2 days 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.69.0 2024