Error on "add styles" form when no uses exist

Created on 16 March 2023, over 1 year ago

Problem/Motivation

When adding a style when there are no uses available I get a couple errors i D9.5.x:

Warning: Undefined array key 1 in Drupal\style_entity\Entity\Styles::getUses() (line 90 of /var/www/html/modules/custom/style_entity/src/Entity/Styles.php)

Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in Drupal\style_entity\Entity\Styles::getUses() (line 85 of /var/www/html/modules/custom/style_entity/src/Entity/Styles.php)

Steps to reproduce

Enable the module and try to create a style before configuring any uses.

Proposed resolution

fix it

Remaining tasks

User interface changes

nope

API changes

nope

Data model changes

nope

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States danflanagan8 St. Louis, US

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

Comments & Activities

Production build 0.71.5 2024