Problem/Motivation
user_user_view() triggers a deprecation on PHP 8.1 because it tries to create a $build['member_for'] for anonymous users which don't have a created time.
Steps to reproduce
Run Drupal\Tests\comment\Functional\CommentAdminTest on PHP 8.1 (note there other deprecations triggered by this test but this is the most important).
Proposed resolution
Don't do this for anonymous users. Anonymous user is not a member so it can't be a member for...
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3241265-2.patch | 743 bytes | alexpott |
Comments
Comment #2
alexpottBefore
After
Comment #3
daffie commentedLooks good to me.
Comment #4
larowlanCommitted deb93f5 and pushed to 9.3.x. Thanks!