Attempt to read property "value" on array in Drupal\do_username\DOComputedFields->getValue()

Created on 18 October 2023, about 1 year ago
Updated 5 September 2024, 2 months ago

Problem/Motivation

The module generates an error in some cases.
Warning: Attempt to read property "value" on array in Drupal\do_username\DOComputedFields->getValue() (line 37 of /app/web/modules/contrib/do_username/src/DOComputedFields.php).

Steps to reproduce

Set the field value to a user where the bio is not set.

Proposed resolution

Check if the `field_bio` exists and contains properties before attempting to read them.

Remaining tasks

Fix the error. We can use the null-safe operator here (making it a single-character fix).

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada hussainweb

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024