Undefined variable $websites in Drupal\do_username\DOComputedFields->getValue()

Created on 18 October 2023, 8 months ago
Updated 19 October 2023, 8 months ago

Problem/Motivation

The module throws an error.

Warning: Undefined variable $websites in Drupal\do_username\DOComputedFields->getValue() (line 67 of /app/web/modules/contrib/do_username/src/DOComputedFields.php).

Steps to reproduce

Enter a user who has no websites listed on their Drupal.org profile and try to read all the fields. This is currently only possible via code but it can happen when we try to serialize the field.

Proposed resolution

It's a simple fix. The variable `$websites` should be reset to an empty array on line 64 in the file. This likely hides other bugs as well but the fix is simple.

๐Ÿ› 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

Comments & Activities

Production build 0.69.0 2024